pythonbeginner
tqdm Progress Bars in Data Pipelines
Add progress bars to pandas operations, loops, and concurrent futures with tqdm.
pythonPress ⌘/Ctrl + Shift + C to copy
from tqdm import tqdm
import pandas as pd, time
for _ in tqdm(range(100), desc='Processing'):
time.sleep(0.01)
tqdm.pandas(desc='Applying transform')
df = pd.DataFrame({'x': range(10_000)})
df['y'] = df['x'].progress_apply(lambda v: v ** 2)
print(df.tail())Use Cases
- ETL monitoring
- batch progress
- long-running jobs
Tags
Related Snippets
Similar patterns you can reuse in the same workflow.
pythonadvanced
Python ETL Pipeline Example
Complete extract-transform-load pipeline with error handling, logging, and incremental processing.
Best for: Automating data ingestion from CSV to warehouse
#etl#pipeline
pythonintermediate
Python Batch Processing Script
Process large files in configurable batches with progress tracking, error handling, and resume support.
Best for: Processing large CSV files that don't fit in memory
#batch-processing#python
pythonadvanced
Database Sync Script in Python
Sync data between two databases with upsert logic, batch processing, and change detection.
Best for: Replicating data between databases
#database#sync
sqlintermediate
SQL Incremental Load Pattern
Incremental data load using watermark tracking to process only new and updated records efficiently.
Best for: Efficient warehouse loading without full reloads
#sql#incremental-load