Generate complete Python data analysis pipelines with pandas, cleaning, and visualization.
## Python Data Analysis Pipeline
Build a complete data analysis pipeline for [DATASET_NAME]:
**Dataset:** [DATASET_DESCRIPTION]
**File Format:** [FORMAT — CSV/JSON/Excel/SQL/Parquet]
**Analysis Goal:** [GOAL — trends/correlations/segmentation/forecasting/anomalies]
**Output:** [OUTPUT — report/dashboard/presentation/automated alert]
**Pipeline Steps:**
### Step 1: Data Loading & Inspection
```python
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
# Load data
df = pd.read_[FORMAT]('[FILE_PATH]')
# Initial inspection
print(f"Shape: {df.shape}")
print(f"Columns: {df.columns.tolist()}")
print(df.dtypes)
print(df.describe())
print(f"Missing values:\n{df.isnull().sum()}")
print(f"Duplicates: {df.duplicated().sum()}")
```
### Step 2: Data Cleaning
- Handle missing values: [STRATEGY — drop/impute mean/impute median/forward fill]
- Remove duplicates based on [KEY_COLUMNS]
- Fix data types: dates, categories, numerics
- Handle outliers: [METHOD — IQR/z-score/domain knowledge]
- Standardize text fields: lowercase, strip whitespace
### Step 3: Feature Engineering
- Create derived columns: [DERIVED_FEATURES]
- Date features: year, month, day_of_week, quarter
- Categorical encoding: [METHOD — one-hot/label/ordinal]
- Aggregations: group by [GROUP_COLUMNS] and compute [AGG_FUNCTIONS]
### Step 4: Exploratory Data Analysis
- Distribution analysis for key numeric columns
- Correlation heatmap
- Time series trends (if temporal data)
- Segmentation analysis by [CATEGORY_COLUMN]
- Top N analysis for [RANKING_METRIC]
### Step 5: Visualization
- Create [VIZ_COUNT] publication-ready charts
- Style: [STYLE — minimal/corporate/academic/infographic]
- Export to [EXPORT — PNG/PDF/HTML interactive]
### Step 6: Key Findings
- Top 5 insights from the data
- Recommendations based on analysis
- Confidence levels and caveats
- Suggested next steps for deeper analysis
**Variables:** Replace [DATASET_NAME], [GOAL], [FORMAT] and all code placeholders.Free to copy and use. Compatible with GPT-5, Gemini 2.5 Pro, Llama 4.
Replace all [BRACKETED] variables with your specific data and requirements.
Initial release
Sign in and download this prompt to leave a review.