home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 1002441911

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/6124#issuecomment-1002441911 https://api.github.com/repos/pydata/xarray/issues/6124 1002441911 IC_kwDOAMm_X847wAy3 14371165 2021-12-29T07:49:07Z 2021-12-29T07:49:07Z MEMBER

A Dataset is more similar to a dict or pd.DataFrame.

DataFrame has a similar error, same cooks I suppose: ```python bool(pd.DataFrame()) *** ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

bool(pd.DataFrame([[0, 2], [0, 4]], columns=['A', 'B'])) *** ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). ```

dict works the same way as a dataset, if something exist in it is True: ```python bool({}) False

bool({'a': False}) True `` I see "if not empty do x"-checks all the time with dicts in python code, Is it that strange to follow the behavior ofdict`?

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