home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 255070082

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/pull/1028#issuecomment-255070082 https://api.github.com/repos/pydata/xarray/issues/1028 255070082 MDEyOklzc3VlQ29tbWVudDI1NTA3MDA4Mg== 4160723 2016-10-20T10:32:57Z 2016-10-20T10:34:21Z MEMBER

Some API design questions (mostly from @shoyer's review) we need to fix: - We need to choose whether to use dim=indexes kwargs or fixed arg/kwarg relative to a given dimension for the signatures of .set_index(), .reset_index() and .reorder_levels(). - Do we also allow .set_index() to rename the dimension(s) if needed, instead of doing .set_index(...).rename(...) ? Is this a common use case that is worth it? - After discussion in #1017, it seems that we need an easy way to (re)set indexes either to no index or to range(n).

For point 1, my preference goes to dim=indexes kwargs, especially if we need 2 and 3. It's less succinct, but it's more close to the signatures of other xarray methods like .reindex() or .sel(), and it allows (re)setting the indexes of multiple dimensions in a single call. Given 2, I find set_index(new_dim_name=['level_1', 'level_3']) a bit more elegant than set_index(['level_1', 'level_2'], name='new_dim_name'). Given 3, array.reset_index('x') seems ambiguous compared to array.reset_index(x=None) (no index) and, e.g., array.reset_index(x='range') (range(n) index).

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