0

I am trying to drop one day data '2020-01-30' from xarray time series dataset ds using Python. Following code doesn't work:

ds_1 = ds.where(ds.time != '2020-01-30', drop=True)

The code runs but returns the same result.

Any help highly appreciated.

Sher
  • 369
  • 2
  • 19

1 Answers1

1

I found a solution from this link.

ds_1 = ds.drop([np.datetime64('2020-01-30')], dim='time')
Sher
  • 369
  • 2
  • 19