oceanmodeling / StormEvents

Python interfaces for observational data surrounding named storm events, born from @jreniel's ADCIRCpy
https://stormevents.readthedocs.io
GNU General Public License v3.0
24 stars 8 forks source link

Support `pandas >= 2` #77

Closed SorooshMani-NOAA closed 1 year ago

SorooshMani-NOAA commented 1 year ago

Right now some tests fail in #76 due to stormevents not supporting the latest pandas version. For specifics see:

https://github.com/oceanmodeling/StormEvents/pull/76#issuecomment-1518001226

Also this update from https://pandas.pydata.org/docs/whatsnew/v2.0.0.html is causing an issue:

  • Changed behavior in setting values with df.loc[:, foo] = bar or df.iloc[:, foo] = bar, these now always attempt to set values inplace before falling back to casting (GH45333)

This results in the following line to fail to change column data type (assuming datatype is originall float):

df.loc[:, 'a'] = df.loc[:, 'a'].astype(int)