home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER" and issue = 1405752975 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: reactions, created_at (date), updated_at (date)

user 4

  • dcherian 1
  • Illviljan 1
  • keewis 1
  • TomNicholas 1

issue 1

  • Plotting empty DataArray oddly raises ImportError · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1276752500 https://github.com/pydata/xarray/issues/7156#issuecomment-1276752500 https://api.github.com/repos/pydata/xarray/issues/7156 IC_kwDOAMm_X85MGbJ0 Illviljan 14371165 2022-10-12T21:24:57Z 2022-10-12T21:24:57Z MEMBER

pandas raises an error when plotting an empty dataframe: ```python import pandas as pd

a = pd.DataFrame()

a.plot() Traceback (most recent call last):

File "C:\Users\J.W\AppData\Local\Temp\ipykernel_14580\3422621525.py", line 1, in <cell line: 1> a.plot()

File "C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages\pandas\plotting_core.py", line 1001, in call return plot_backend.plot(data, kind=kind, **kwargs)

File "C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages\pandas\plotting_matplotlib__init__.py", line 71, in plot plot_obj.generate()

File "C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages\pandas\plotting_matplotlib\core.py", line 451, in generate self._compute_plot_data()

File "C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages\pandas\plotting_matplotlib\core.py", line 636, in _compute_plot_data raise TypeError("no numeric data to plot")

TypeError: no numeric data to plot ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting empty DataArray oddly raises ImportError 1405752975
1276635221 https://github.com/pydata/xarray/issues/7156#issuecomment-1276635221 https://api.github.com/repos/pydata/xarray/issues/7156 IC_kwDOAMm_X85MF-hV dcherian 2448579 2022-10-12T19:21:00Z 2022-10-12T19:21:00Z MEMBER

I don't think we have a test for plotting empty DataArrays, so no combination of dependencies would've picked that up?

We should just explicitly check for da.size > 0 before trying anything in .plot

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting empty DataArray oddly raises ImportError 1405752975
1276623786 https://github.com/pydata/xarray/issues/7156#issuecomment-1276623786 https://api.github.com/repos/pydata/xarray/issues/7156 IC_kwDOAMm_X85MF7uq keewis 14808389 2022-10-12T19:11:38Z 2022-10-12T19:11:38Z MEMBER

the issue is that we only have a minimum dependencies CI (i.e. pandas and numpy but not matplotlib) and one that tests all dependencies with minimum versions. This means that we don't have an environment could have caught this (we'd need one with matplotlib but not nc-time-axis). This case is one of the issues we run into with so many optional dependencies: we can't just test every combination of them (the "all but dask" CI is an exception).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting empty DataArray oddly raises ImportError 1405752975
1276555939 https://github.com/pydata/xarray/issues/7156#issuecomment-1276555939 https://api.github.com/repos/pydata/xarray/issues/7156 IC_kwDOAMm_X85MFrKj TomNicholas 35968931 2022-10-12T18:11:52Z 2022-10-12T18:11:52Z MEMBER

Thanks for the bug report @derhintze !

I'm confused as to why this wasn't caught by our tests - I thought we had a minimum-dependencies test run in our suite :confused:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting empty DataArray oddly raises ImportError 1405752975

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 12.265ms · About: xarray-datasette