-
-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xarray integration #705
Comments
Hi, I've been looking for an xarray validation library for a while now and I was wondering: is integration in Pandera still planned? Thanks! |
In reply to @cosmicBboy's request on Discord, here is a simple xarray.DataArray schema that I would like to validate using Pandera:
What I want to be able to do is:
Note that this is for a simple DataArray, not a Dataset. |
@avcopan thank you! just to follow up, I'm not super familiar with xarray, so it would it help a lot if you could write out the xarray-native assertions that you would write for the following validations:
I can then start to map those over to the pandera api |
Oh, sure! With the above example, you would just do:
|
|
Is your feature request related to a problem? Please describe.
xarray is a project that provides a dict-like data container abstraction for ndimensional arrays. It shares some commonalities with
pandas
, but there many key differences (e.g.coords
andattrs
).After chatting with @jhamman about this approach, we decided it would be appropriate to park
xarray-schema
within the pandera codebase. This issue tracks the planned integration of xarray-schema into thepandera
codebase.Describe the solution you'd like
A good start for this integration is to add a
pandera.xarray
module exposing the schema and schema component classes specific toxarray
:TODO
xarray-schema
codebase intopandera.xarray
Describe alternatives you've considered
The main alternative to this integration is to keep
xarray-schema
as a separate project that's interoperable withpandera
. However, given thatpandera
plans on expanding its scope to validate data containers beyond pandas, it would benefit this project to maintain schema interfaces for multiple (not just pandas-like) data container libraries.Additional context
The text was updated successfully, but these errors were encountered: