Skip to content

Commit 2f2355c

Browse files
committed
improve readme and bump version to 0.8.0
1 parent 59f88ba commit 2f2355c

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,19 @@
77

88
## Description
99

10-
In projects using Pandas, it's very common to have functions that take Pandas DataFrames as input or produce them as output.
11-
It's hard to figure out quickly what these DataFrames contain. This library offers simple decorators to annotate your functions
12-
so that they document themselves and that documentation is kept up-to-date by validating the input and output on runtime.
13-
14-
For example,
10+
Working with DataFrames often means passing them through multiple transformation functions, making it easy to lose track of their structure over time. DAFFY adds runtime validation and documentation to your DataFrame operations through simple decorators. By declaring the expected columns and types in your function definitions, you can:
1511

1612
```python
17-
@df_in(columns=["Brand", "Price"]) # the function expects a DataFrame as input parameter with columns Brand and Price
18-
@df_out(columns=["Brand", "Price"]) # the function will return a DataFrame with columns Brand and Price
19-
def filter_cars(car_df):
20-
# before this code is executed, the input DataFrame is validated according to the above decorator
21-
# filter some cars..
22-
return filtered_cars_df
13+
@df_in(columns=["price", "bedrooms", "location"])
14+
@df_out(columns=["price_per_room", "price_category"])
15+
def analyze_housing(houses_df):
16+
# Transform raw housing data into price analysis
17+
return analyzed_df
2318
```
2419

20+
Like type hints for DataFrames, DAFFY helps you catch structural mismatches early and keeps your data pipeline documentation synchronized with the code. Compatible with both Pandas and Polars.
21+
22+
2523
## Table of Contents
2624
* [Installation](#installation)
2725
* [Usage](#usage)
@@ -167,6 +165,10 @@ MIT
167165

168166
## Changelog
169167

168+
### 0.8.0
169+
170+
- Support Polars DataFrames
171+
170172
### 0.7.0
171173

172174
- Support Pandas 2.x

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "daffy"
3-
version = "0.7.0"
4-
description = "Function decorators for Pandas Dataframe column name and data type validation"
3+
version = "0.8.0"
4+
description = "Function decorators for Pandas and Polars Dataframe column name and data type validation"
55
authors = [
66
{ name="Janne Sinivirta", email="[email protected]" },
77
]

0 commit comments

Comments
 (0)