unionai-oss / pandera

A light-weight, flexible, and expressive statistical data testing library
https://www.union.ai/pandera
MIT License
3.05k stars 281 forks source link

Make `pydantic` and `typeguard` extras for pandas generic type support #1577

Open cosmicBboy opened 1 month ago

cosmicBboy commented 1 month ago

Currently, pydantic and typeguard are being used in pandas_engine.py to implement support for generic types via the PythonGenericType datatype: https://github.com/unionai-oss/pandera/blob/main/pandera/engines/pandas_engine.py#L1347.

Consider making this either: a soft dependency such that the types are only available if these packages are available, or adding an additional extra to pandera, i.e. pip install 'pandera[generics] or something to that effect.