Closed eyaltra closed 5 years ago
Support xarray in the same way done in pyjanitor PR
Example of a small run for validating Regression + New stuff:
import pandas as pd import pandas_flavor as pf @pf.register_dataframe_method @pf.register_xarray_dataarray_method @pf.register_xarray_dataset_method def print_df(df): print(df) return df df = pd.DataFrame(data={"x": [10, 20, 25], "y": [0, 2, 5]}) df.print_df() df.to_xarray().print_df()
import pandas as pd
import pandas_flavor as pf
@pf.register_dataframe_method @pf.register_xarray_dataarray_method @pf.register_xarray_dataset_method def print_df(df): print(df) return df
df = pd.DataFrame(data={"x": [10, 20, 25], "y": [0, 2, 5]}) df.print_df() df.to_xarray().print_df()
Looks great. Happy to merge as-is.
I need to add some tests to pandas-flavor (in general, not just for this PR) before cutting a release. I'll try to work on that tomorrow and cut a release ASAP.
Support xarray in the same way done in pyjanitor PR
Example of a small run for validating Regression + New stuff: