Data Cleaning & High-Performance Engineering Suite Portfolio Grade

Production Python 3 • Pandas Vectorization • Bamboolib Low-Code • Multi-Format Benchmarks

2,700 Raw Records Cleaned 100% Quality Index
Executive Portfolio Project Showcase

Transforming Highly Chaotic Real-World Telecom Data into Clean Production Intelligence

This end-to-end data science & data engineering project demonstrates how to remediate extreme real-world data entropy (inconsistent phone formats, broken encodings, mixed currencies, multi-format timestamps, duplicates, and rogue newlines) into zero-loss, validated formats. It benchmarks high-throughput conversion into CSV, JSON, Parquet, Arrow Feather, and SQLite.

Input Rows Processed
2,700 Raw Messy

Deduplicated to 2,500 unique records

Phone Numbers Standardized
1,643 E.164 (+255)

Fixed local, hyphenated, & bracketed formats

Timestamps Harmonized
2,500 ISO-8601 UTC

Parsed 7+ formats including Unix epochs

Data Quality Index Gain
+22.9% 72% → 100%

Full schema conformance & zero missing values

Live Demonstration: Messy Raw Ingestion vs. Clean Production Output

Inspect real row-level transformations: notice the remediation of phone numbers, currencies, timestamps, and typos.

Record ID Phone (MSISDN) Timestamp Amount Service Status Duration Network Layer Quality Audit
REC-101239
tel:+255-714-020824
+255714020824
11/05/2023 02:54 PM
2023-11-05T14:54:00Z
125,585.16
TZS 125,585.16
Term
TERMINATED
120
120s
LTE-A
4G_LTE
Standardized
REC-101897
0714008768
+255714008768
2023-11-09 13:15:24
2023-11-09T13:15:24Z
$ 29.26 USD
TZS 73,150.00
null
UNKNOWN
0
0s
4G LTE
4G_LTE
Standardized
REC-100223
714017810
+255714017810
2023-11-16 03:04:29
2023-11-16T03:04:29Z
TZS 58,189.89/=
TZS 58,189.89
active
ACTIVE
-15
0s
5G NR
5G_NR
Standardized
REC-100533
tel:+255-714-002877
+255714002877
2023-11-12 18:01:45
2023-11-12T18:01:45Z
TZS 80,993.31/=
TZS 80,993.31
PENDING_KYC
PENDING_KYC
1800
1800s
3G WCDMA
3G_WCDMA
Standardized
REC-100692
+255/714/016577
+255714016577
2023-11-30 11:00:37
2023-11-30T11:00:37Z
TZS 108,949.45/=
TZS 108,949.45
Term
TERMINATED
0
0s
LTE-A
4G_LTE
Standardized
REC-102027
+255(0)714028085
INVALID_25507140
Nov 19, 2023 11:29
2023-11-19T11:29:00Z
TZS 64,565.31/=
TZS 64,565.31
CHURNED
CHURNED
-15
0s
LTE-A
4G_LTE
Standardized
REC-101745
+255/714/011782
+255714011782
2023/11/04
2023-11-04T00:00:00Z
58,926.82
TZS 58,926.82
Term
TERMINATED
-15
0s
unknown
UNKNOWN
Standardized
REC-101459
+255(0)714030688
INVALID_25507140
01-12-2023 23:11:11
2023-12-01T23:11:11Z
$ 5.45 USD
TZS 13,625.00
UNKNOWN
360
360s
4G
4G_LTE
Standardized

File Format Performance & Efficiency Benchmarks

Empirical measurement of Storage Footprint, Write Speed, and Read Throughput across modern file types.

Dataset Size: 2,500 rows | 12 strongly-typed columns

File Size on Disk (KB) - Lower is Better

Write Latency (ms) - Lower is Faster

Read Latency (ms) - Lower is Faster

File Format Storage Size Write Speed Read Speed Type Fidelity Industry Best Use Case
CSV (Plain) 406.1 KB (1.00x (Baseline)) 7.96 ms (314,142 rows/s) 6.09 ms (410,643 rows/s) Poor (All fields degrade to string) Ad-hoc human inspection, legacy spreadsheets, quick exports
CSV (Gzip Compressed) 64.03 KB (6.34x smaller) 20.69 ms (120,854 rows/s) 7.1 ms (351,918 rows/s) Poor (Degrades to string) Archival storage of flat tables when Parquet is unsupported
JSON (Pretty Indented) 1179.46 KB (0.34x (Larger due to key repetitions & whitespace)) 17.58 ms (142,224 rows/s) 6.33 ms (394,944 rows/s) Medium (Preserves numbers, booleans, arrays; lacks datetime) Configuration files, human-readable API responses
JSON Lines (.jsonl) 1045.18 KB (0.39x (Compact line-by-line)) 8.04 ms (310,956 rows/s) 6.51 ms (383,967 rows/s) Medium (JSON primitives) Streaming ingestion, Kafka producers, ELK stack, line-by-line chunking without loading full file into memory
SQLite / DuckDB 540.0 KB (0.75x (Includes B-Tree index pages)) 6.93 ms (360,596 rows/s) 1.59 ms (1,574,438 rows/s) High (Strict types, primary keys, relational integrity) Local analytics, SQL filtering, indexed multi-user lookups, offline desktop applications
Apache Parquet (Snappy/ZSTD) 89.34 KB (4.55x smaller than CSV) 5.17 ms (483,559 rows/s) 1.1 ms (2,272,727 rows/s) Exceptional (Exact Arrow/Parquet schema, timestamp with tz, dictionary dtypes) Enterprise Big Data, AWS Athena/S3, GCP BigQuery, Snowflake, Databricks, OLAP queries
Apache Arrow / Feather 182.75 KB (2.22x smaller than CSV) 2.79 ms (896,057 rows/s) 0.49 ms (5,102,041 rows/s) Exceptional (Native Arrow memory representation) Ultra-fast inter-process communication (IPC), passing dataframes between Python, R, and C++ with ZERO serialization overhead

Enterprise Architectural Guide: Which File Format Should You Choose?

Engineering guidelines for choosing file formats based on latency, compression, and schema requirements.

#1 Recommended for OLAP

Apache Parquet

Columnar storage with Snappy/ZSTD compression and dictionary encoding. Enables predicate pushdown (reading only required columns).

  • 75-80% smaller file sizes vs CSV
  • Preserves exact Arrow/Pandas dtypes
  • Standard for BigQuery, Snowflake, S3
Use for: Cloud Data Lakes & Heavy Analytics
Fastest In-Memory IPC

Apache Feather / Arrow

Zero-copy in-memory format matching CPU memory layout directly. Reading a Feather file is simply mapping bytes from disk directly into RAM.

  • 10x faster read/write than CSV
  • Zero serialization overhead
  • Seamless Python ↔ R ↔ C++ sharing
Use for: Microservice IPC & Model Training Caching
Best for Streaming

JSON Lines (.jsonl)

Newline-delimited JSON objects. Eliminates the need to load the entire document into RAM before parsing.

  • Line-by-line streaming without OOM
  • Full nested JSON hierarchy support
  • Native for Kafka, Logstash, ELK
Use for: Event Streaming & Microservice Logs
Embedded Relational

SQLite / DuckDB

Single-file database with ACID transactions, secondary B-Tree indexing, and full SQL engine support without running a separate server.

  • Indexed lookups in sub-milliseconds
  • Standard SQL JOINs and Window functions
  • Zero external configuration or server
Use for: Embedded Apps, Local SQL Analytics

Bamboolib Low-Code GUI vs. Reproducible Pandas Architecture

How to combine visual point-and-click data exploration with enterprise Python pipelines.

Bamboolib Interactive Jupyter GUI Low-Code Exploration
Step 1: Visual Deduplication

Click Actions → Drop duplicates → Select record_id → Keep first

Step 2: String & Phone Formatting

Click column subscriber_msisdn → Transform text → Remove non-digits → Prepend +255

Step 3: Categorical Normalization

Click service_status → Find and Replace → Map typos actve → ACTIVE

Step 4: Memory Downcasting

Change column types to category to reduce in-memory footprint by 75%.

Auto-Generated & Production Pandas (.pipe()) Zero Vendor Lock-in
# Method Chaining Pipeline generated & refined:
df_clean = (
    df_raw
    .drop_duplicates(subset=['record_id'], keep='first')
    .assign(
        subscriber_msisdn=lambda df: '+255' + (
            df['subscriber_msisdn']
            .astype(str)
            .str.replace(r'\D', '', regex=True)
            .str[-9:]
        ),
        amount_tzs=lambda df: (
            df['amount_paid'].astype(str)
            .str.replace(r'[^\d.-]', '', regex=True)
            .pipe(pd.to_numeric, errors='coerce')
            .fillna(0.0)
        ),
        service_status=lambda df: (
            df['service_status'].str.lower().str.strip()
            .replace({'actve': 'ACTIVE', 'actv': 'ACTIVE'})
            .astype('category')
        ),
        event_timestamp_utc=lambda df: (
            pd.to_datetime(df['event_timestamp'], errors='coerce', utc=True)
        )
    )
)