PD_TOL is a lightweight Python decorator that provides error-tolerant processing for pandas DataFrame operations. It helps prevent code from breaking due to row-level issues in real-world datasets, automatically skipping rows that would otherwise cause exceptions.
Ideal for robust data pipelines, quick experimentation, and processing messy data.
- ✅ Seamlessly skips problematic rows in
pandas.DataFrameoperations - ⚡ Minimal overhead on clean data
- 🛠️ Works with functions that return modified DataFrames or operate in-place
- 🧪 Ideal for exploratory data analysis and production scenarios alike
from PDT import PD_TOL@PD_TOL
def calculate_salary_in_thousands(df):
df["salary_k"] = df["salary"] / 1000
return df
For specific use cases, please refer to
example_usage.py(generated by Claude4)