home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 391914654

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/2180#issuecomment-391914654 https://api.github.com/repos/pydata/xarray/issues/2180 391914654 MDEyOklzc3VlQ29tbWVudDM5MTkxNDY1NA== 6213168 2018-05-25T01:32:51Z 2018-05-25T01:33:25Z MEMBER

If there are conflicts in dimension coordinate, should it be outer join?

Consider this example: a = Dataset({ 'x': [10, 20], 'd1': ('x', [100, 200]), 'd2': ('x', [300, 400]) }) b = Dataset({ 'x': [15], 'd1': ('x', [500]), }) a.update(b) In the above, with anything but an outer join you're destroying d2 - which doesn't even exist in the rhs dataset! A sane, desirable outcome should be Dataset({ 'x': [10, 20, 15], 'd1': ('x', [nan, nan, 500]), 'd2': ('x', [300, 400, nan]) })

If there are no conflicts in dimension coordinate, but there are conflicts in non dimension coordinate, whether left or right should be prioritized?

I think this should be a right join. I alway think of non-index coords as N-to-1 properties of the index. For example, a = Dataset( coords={ 'country': ('country', ['UK', 'France', 'Greece']), 'currency': ('country', ['GBP', 'EUR', 'EUR']), }, data_vars={ 'GDP': ('country', [1000, 2000, 3000]), 'Debt': ('country', [100, 200, 300]), }) b = Dataset( # Greece exits the Eurozone coords={ 'country': ('country', ['UK', 'France', 'Greece']), 'currency': ('country', ['GBP', 'EUR', 'GRD']), }, data_vars={ 'GDP': ('country', [1000, 2000, 150000]), }) a.update(b) In the above example, I just broke the Debt variable - as I forgot to perform a currency conversion for the greek debt, which has been silently changed from 300 EUR to 300 GRD. However I can't see any elegant way to avoid this. I definitely would not like to duplicate the 'country' index.

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