A flexible pandas DataFrame profiling package for dataset exploration and history management.
Project description
cosmic-probe
cosmic-probe is a flexible Python package for profiling pandas DataFrames, supporting quick data exploration and storing profiling history with metadata. It’s designed to be simple to use yet powerful enough to handle data from databases, files, or queries.
Features
- Profile any pandas DataFrame with detailed column statistics
- Summarize anomalies like high null percentages, low uniqueness, and constant columns
- Store profiling reports with metadata to SQLite by default (extensible to other databases)
- Designed as part of the cosmiclode ecosystem, easy to integrate with other cosmic packages
Installation
pip install cosmic-probe
Quickstart
import pandas as pd
from cosmic_probe import ProbeManager
# Sample DataFrame
data = {
"age": [25, 30, 22, None, 40],
"salary": [50000, 60000, 52000, 58000, None],
"department": ["HR", "IT", "IT", "HR", "Finance"],
}
df = pd.DataFrame(data)
# Initialize ProbeManager
probe = ProbeManager()
# Profile the DataFrame
profile_df = probe.profile(df)
print(profile_df)
# Summarize anomalies
summary_df = probe.summarize()
print(summary_df)
# Store profiling results
probe.store_to_sqlite(database="csv", schema="csv", table="sample_data")
API
ProbeManager
-
profile(df: pd.DataFrame) -> pd.DataFrame: Profiles the DataFrame and stores the result internally. -
summarize(null_threshold=20.0, unique_threshold=5) -> pd.DataFrame: Summarizes anomalies from the last profile. -
store_to_sqlite(database: str, schema: str, table: str, db_path: str = "profiles.db"): Stores the latest profile to SQLite with metadata.
Profiler
-
profile(df: pd.DataFrame) -> pd.DataFrame: Core method to generate profile for each column. -
summarize(profile_df: pd.DataFrame, null_threshold=20.0, unique_threshold=5) -> pd.DataFrame: Summarizes anomalies in a given profile DataFrame.
Contribution
Contributions and suggestions are welcome! Please open issues or pull requests on the GitHub repo.
📝 License
This project is licensed under the MIT License.
✨ Author
Vinod Yerrapureddy
📧 yerrapureddyvinodreddy@gmail.com
🌐 vinodreddy.netlify.app
🔗 LinkedIn
🍥 Anime fan | 💻 Data engineer | 🛠️ Systems hacker
Project details
Release history Release notifications | RSS feed
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 cosmiclode_cosmic_probe-0.1.0.tar.gz.
File metadata
- Download URL: cosmiclode_cosmic_probe-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0a090ef0c914040aff3585cfa999ba2dbb8bcc1d46bc35ce099d068d8bcd957
|
|
| MD5 |
f0fa9a026b51f4027555062f4348246d
|
|
| BLAKE2b-256 |
0262d5d0c86e3212ba251a7e4a99056f67f6a444f54fa7d47e57cac010255100
|
File details
Details for the file cosmiclode_cosmic_probe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cosmiclode_cosmic_probe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8329f951445da972c629dde094db08428f83eea94fa4e9a8caffe7327f81fc4
|
|
| MD5 |
46ca3d10f2fbcd837a15a9fc3380d82b
|
|
| BLAKE2b-256 |
a9b9ff564f1379215afd33b118dfd489b14ac41d84ea6e6fabaf40eb9553da1e
|