A beginner-friendly CSV analysis and ML data preparation toolkit
Project description
DipenCSV 🐼
DipenCSV is to pandas what seaborn is to matplotlib — a friendlier, higher-level API.
A beginner-friendly CSV analysis and ML data preparation toolkit built on top of pandas. Helps students and small teams clean, analyze, and prepare CSV data for machine learning — without needing to know pandas.
Who is it for?
- 🎓 Students cleaning data for ML assignments
- 🚀 Small startups needing quick data insights
- 👨💻 Developers who work with CSVs occasionally
- 📊 Anyone who finds pandas too complex
Installation
pip install dipencsv
Quick Start
from dipencsv import Data
data = Data("your_file.csv")
data.magic() # one click everything
Full ML Workflow in 15 lines
from dipencsv import Data
from sklearn.ensemble import RandomForestClassifier
data = Data("titanic.csv")
data.clean()
data.drop(["passengerid", "name", "ticket", "cabin"])
data.encode("sex")
data.encode("embarked")
data.remove_outliers("fare")
data.normalize("fare")
data.normalize("age")
train, test = data.split(test_size=0.2)
X_train = train.drop("survived", axis=1)
y_train = train["survived"]
X_test = test.drop("survived", axis=1)
y_test = test["survived"]
model = RandomForestClassifier()
model.fit(X_train, y_train)
print(f"Accuracy: {model.score(X_test, y_test):.2f}")
# Accuracy: 0.76
All Commands
Loading
data = Data("file.csv") # auto mode
data = Data("bigfile.csv", stream=True) # force stream mode
data = Data("file.csv", auto_mode=False) # force pandas mode
Properties
print(data.columns) # list of column names
print(data.shape) # (rows, columns)
Understanding Data
data.summary() # rows, cols, types, missing values
data.report() # duplicates, missing %, basic stats
data.explain() # trends, issues, suggestions
data.magic() # ⭐ one click full analysis
Cleaning
data.clean() # auto clean (safe mode)
data.clean(strategy="aggressive") # drop rows with missing values
data.drop("column") # drop one column
data.drop(["col1", "col2"]) # drop multiple columns
data.rename("old_name", "new_name") # rename column
data.fill("column", value) # fill missing values manually
⚠️ After clean(), column names become lowercase with underscores. Always check:
print(data.columns)
ML Preparation
data.encode("gender") # text → numbers (label encoding)
data.normalize("age") # scale to [0, 1]
data.standardize("salary") # scale to mean=0, std=1
data.remove_outliers("price") # remove extreme values (IQR method)
train, test = data.split(test_size=0.2) # train/test split
Analytics
data.mean("salary")
data.median("age")
data.max("salary")
data.min("salary")
data.count("city")
data.correlation("age", "salary")
data.correlation_matrix()
data.distribution("salary")
data.outliers("salary")
data.describe()
data.value_counts("city")
data.group_mean("city", "salary")
Querying
data.first() # first 5 rows
data.first(10) # first 10 rows
data.last() # last 5 rows
data.sort("age") # sort ascending
data.sort("age", asc=False) # sort descending
data.find("city", "Bangalore") # find rows by value
Intelligence
data.ask("average salary")
data.ask("top 10 salary")
data.ask("highest salary by city")
data.ask("lowest age")
data.ask("count city")
data.explain()
data.magic()
Export
data.export("output.csv") # CSV
data.export("output.json") # JSON
data.export("output.xlsx") # Excel (requires openpyxl)
Stream Mode (Big Files)
DipenCSV auto detects file size and switches to stream mode for files > 500MB:
data = Data("hugefile.csv") # auto detects
data = Data("hugefile.csv", stream=True) # force stream
Supported in stream mode: mean(), max(), min(), count(), group_mean(), filter(), top_n()
Smart Error Handling
data.mean("salry")
# ❌ Column 'salry' not found.
# 💡 Did you mean:
# - salary
# - salary_usd
Common Issues
KeyError after clean()
data.clean()
print(data.columns) # check actual column names
data.mean("salary") # use lowercase
Excel export failing
pip install openpyxl
Big file crashes
data = Data("bigfile.csv", stream=True)
Dependencies
pandas >= 1.5.0scikit-learn >= 1.0.0openpyxl >= 3.0.0(optional, Excel export)
Documentation
| Doc | What it covers |
|---|---|
| Getting Started | installation, quick start |
| Loading Data | Data(), auto mode, stream mode |
| Properties | columns, shape |
| Understanding Data | summary, report, explain, magic |
| Cleaning Data | clean, drop, rename, fill |
| ML Preparation | encode, normalize, split etc |
| Analytics | mean, correlation, outliers etc |
| Query | sort, find, first, last |
| Intelligence | ask, explain, magic |
| Stream Mode | big file handling |
| Export | csv, json, xlsx |
| Examples | real world examples |
| FAQ | common student questions |
| ML Workflow | full end-to-end ML example |
License
MIT License
Author
Built by Dipendra — a CS student who wanted pandas to be less painful.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dipencsv-0.1.4.tar.gz.
File metadata
- Download URL: dipencsv-0.1.4.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15051587f43bcf1acb184203f98a1a07d2e179548d56e113051c47435ea3c4dc
|
|
| MD5 |
244d177f96d23b34bc6e7ed795d1dead
|
|
| BLAKE2b-256 |
9424ccaf2b52e25755cf4545aa3f7ba0df64a3d8a05a5eb99ebcdd7ccf94ad6b
|
File details
Details for the file dipencsv-0.1.4-py3-none-any.whl.
File metadata
- Download URL: dipencsv-0.1.4-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d9e0606a0d11c5b1ac7fc090f76d4f9c27ffd8e693757d46d8d13b33d58650d
|
|
| MD5 |
776b726fce7143c2e645478f69a45232
|
|
| BLAKE2b-256 |
c43d4f4a30c4279983de533b75fde45671309f1b9cd8cb36d9d5908c2cce9028
|