niosh-mining / obsplus

A Pandas-Centric ObsPy Expansion Pack
GNU Lesser General Public License v3.0
38 stars 8 forks source link

Pandas 1.4 causing problem with df_to_inventory tests #249

Closed sboltz closed 2 years ago

sboltz commented 2 years ago

Description It looks like pandas 1.4 introduced a subtle bug to obsplus.utils.df_to_inventory where it will unexpectedly delete values from the end_time column. It looks like there is something about the index slicing in line 114 of obsplus.utils.stations that is causing the problem, but I can't for the life of me figure out what it is.

As a temporary workaround, I'm going to pin the pandas version to <1.4.

To Reproduce Install pandas 1.4 and run the test suite for obsplus. tests/test_utils/test_stations_utils.py::TestDfToInventory::test_new on the comparison of the input and output DataFrames. On the output df, the end date has been removed for three of the stations/channels.

Expected behavior The end dates shouldn't be getting dropped.

Versions (please complete the following information):

d-chambers commented 2 years ago

fixed by #252