pysat / pysatSeasons

Seasonal Analysis routines for pysat
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

BUG: Panel deprecation #4

Closed jklenzing closed 2 years ago

jklenzing commented 5 years ago

Migrating from pysat/pysat#159. See full history there.

/home/travis/build/rstoneback/pysat/pysat/ssnl/avg.py:167: FutureWarning: 
Panel is deprecated and will be removed in a future version.
The recommended way to represent these types of 3-dimensional data are with a MultiIndex 
on a DataFrame, via the Panel.to_frame() method
Alternatively, you can use the xarray package http://xarray.pydata.org/en/stable/.
Pandas provides a `.to_xarray()` method to help automate this conversion.
jklenzing commented 5 years ago

Panel is removed as of pandas 0.25.0.

https://pandas.pydata.org/pandas-docs/version/0.25/whatsnew/v0.25.0.html#removal-of-prior-version-deprecations-changes

jklenzing commented 4 years ago

Note: If the default object to store seasonal averages is assumed to be an xarray dataset or similar object rather than a panel, this should help out with #3. The code could convert pandas to xarray data if needed, then just assume everything is xarray afterwards.