home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 902918293

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/5721#issuecomment-902918293 https://api.github.com/repos/pydata/xarray/issues/5721 902918293 IC_kwDOAMm_X8410XCV 6628425 2021-08-20T19:47:19Z 2021-08-20T19:47:19Z MEMBER

Thanks for the heads up @mathause. We'll need to think carefully about this with respect to partial datetime string indexing. DatetimeIndex.get_indexer and DatetimeIndex.get_loc behave differently with respect to datetime strings. get_indexer interprets strings as specific dates, while get_loc interprets them as ranges: ```

import pandas as pd times = pd.date_range("2000", periods=5) times.get_indexer(["2000"]) array([0]) times.get_loc("2000") slice(0, 5, None) `` In other words -- at least for partial datetime string indexing -- it may not be as simple as swapping inget_indexerforget_loc`.

Perhaps @jbrockmendel has thoughts on how we should approach this?

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