home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1444102119

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/7558#issuecomment-1444102119 https://api.github.com/repos/pydata/xarray/issues/7558 1444102119 IC_kwDOAMm_X85WEz_n 2448579 2023-02-24T17:36:09Z 2023-02-24T17:36:09Z MEMBER

Thanks @arfriedman . Here's how to solve it

``` python import pandas as pd

air["time"] = air.time + pd.Timedelta("1D") ```

Today shift operates in "index space" i.e. it ignores any coordinate labels and simply moves values along an axis by integer offsets. This is conceptually different to your proposal for supporting a frequency string. I can see it being useful though.

The addition above is what you would do to shift longitude values by 0.5 for example. Perhaps that would be a useful API addition as shift_labels?

Let's see what others think.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  1599044689
Powered by Datasette · Queries took 0.7ms · About: xarray-datasette