Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有数据集数据,我发现异常,所以结果是带有坐标(经度、纬度)和时间的数据数组,时间是年数。
如何将时间更改为 6 月 1 日、6 月 2 日......到目前为止?
截图xarray.DataArray
xarray.DataArray
我想你可以做
pandas.to_datetime(x['time'],origin=datetime.datetime(2020,1,1),unit="D")
(这假设 int 是今年的天数和 1 月 1 == 0)