github unionai-oss/pandera v0.29.0
Release 0.29.0: support list, dict, and tuple of dataframes

7 hours ago

⭐️ Highlight

Pandera now supports collection types containing dataframes, shoutout to @garethellis0 with an amazing first contribution!

@pa.check_types
def process_tuple_and_return_dict(
    dfs: tuple[DataFrame[OnlyZeroesSchema], DataFrame[OnlyOnesSchema]],
) -> dict[str, DataFrame[OnlyZeroesSchema]]:
    return {
        "foo": dfs[0],
        "bar": dfs[0]
    }


result = process_tuple_and_return_dict((
    pd.DataFrame({"a": [0, 0]}),
    pd.DataFrame({"a": [1, 1]}),
))
print(result)

What's Changed

New Contributors

Full Changelog: v0.28.1...v0.29.0

Don't miss a new pandera release

NewReleases is sending notifications on new releases.