Catch errors with a verbose, talkative python pandas.
A Python module that creates ExpressDataFrame
, a class that inherits from pandas DataFrame and provides enhanced error handling with verbose, helpful feedback.
pip install pandas-express
- Verbose Feedback: Get helpful messages for every operation
- Enhanced Error Handling: Better error messages with tips for common issues
- Full pandas Compatibility: Inherits all pandas DataFrame functionality
- Easy to Use: Drop-in replacement for pandas DataFrame
import pandasExpress as px
from pandasExpress import ExpressDataFrame
# Create an ExpressDataFrame from various data sources
df = ExpressDataFrame(data)
# Or load from the included sample data
import json
with open('data.json', 'r') as f:
sample_data = json.load(f)
df = ExpressDataFrame(sample_data)
import pandasExpress as px
from pandasExpress import ExpressDataFrame
import json
# Load sample data
with open('data.json', 'r') as f:
data = json.load(f)
# Create ExpressDataFrame
df = ExpressDataFrame(data)
# ✅ ExpressDataFrame created successfully with shape (5, 5)
# 📊 Columns: ['name', 'age', 'city', 'salary', 'department']
# Get basic info with verbose output
df.info()
# 📋 ExpressDataFrame Info:
# ==================================================
# <class 'pandasExpress.express_dataframe.ExpressDataFrame'>
# RangeIndex: 5 entries, 0 to 4
# Data columns (total 5 columns):
# # Column Non-Null Count Dtype
# --- ------ -------------- -----
# 0 name 5 non-null object
# 1 age 5 non-null int64
# 2 city 5 non-null object
# 3 salary 5 non-null int64
# 4 department 5 non-null object
# dtypes: int64(2), object(3)
# memory usage: 328.0+ bytes
# ==================================================
# 💭 This DataFrame has 5 rows and 5 columns
# ✅ No missing values detected
# Access columns with feedback
engineering_staff = df[df['department'] == 'Engineering']
# 📍 Accessing column: 'department'
# View data with helpful messages
df.head(3)
# 👀 Showing first 3 rows of 5 total rows
A verbose extension of pandas DataFrame that provides enhanced feedback and error handling.
All pandas DataFrame methods are available, plus enhanced versions of:
head(n=5)
: Show first n rows with verbose feedbacktail(n=5)
: Show last n rows with verbose feedbackinfo()
: Enhanced info display with helpful summariesdescribe()
: Generate statistics with progress feedbackdropna()
: Remove missing values with detailed reportingfillna()
: Fill missing values with progress tracking
- Maintains all pandas DataFrame properties
- Enhanced string representation with shape information
- Python 3.8+
- pandas >= 1.3.0
# Clone the repository
git clone https://github.com/NDNnerd/pandas-express.git
cd pandas-express
# Install in development mode
pip install -e .[dev]
# Run tests
pytest
# Format code
black pandasExpress/
isort pandasExpress/
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.