home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 813169922

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/5089#issuecomment-813169922 https://api.github.com/repos/pydata/xarray/issues/5089 813169922 MDEyOklzc3VlQ29tbWVudDgxMzE2OTkyMg== 15331990 2021-04-05T04:09:26Z 2021-04-05T04:09:26Z CONTRIBUTOR

I prefer drop duplicate values to be under the unique() PR; maybe could be renamed as drop_duplicate_values().

Also I think preserving existing dimensions is more powerful than flattening the dimensions.

On Sun, Apr 4, 2021, 11:01 PM Stephan Hoyer @.***> wrote:

From an API perspective, I think the name drop_duplicates() would be fine. I would guess that handling arbitrary variables in a Dataset would not be any harder than handling only coordinates?

One thing that is a little puzzling to me is how deduplicating across multiple dimensions is handled. It looks like this function preserves existing dimensions, but inserts NA is the arrays would be ragged? This seems a little strange to me. I think it could make more sense to "flatten" all dimensions in the contained variables into a new dimension when dropping duplicates.

This would require specifying the name for the new dimension(s), but perhaps that could work by switching to the de-duplicated variable name? For example, ds.drop_duplicates('valid') on the example in the PR description would result in a "valid" coordinate/dimension of length 3.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pydata/xarray/pull/5089#issuecomment-813168052, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADU7FFWCT2NXOR2AYNLGVQDTHEYYFANCNFSM4Z6ZAMUA .

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