home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 1613054013 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 3

  • quantsnus 3
  • Karimat22 2
  • kmuehlbauer 1

author_association 3

  • CONTRIBUTOR 3
  • NONE 2
  • MEMBER 1

issue 1

  • Plotting with time-zone-aware pd.Timestamp axis not possible · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
1461573402 https://github.com/pydata/xarray/issues/7593#issuecomment-1461573402 https://api.github.com/repos/pydata/xarray/issues/7593 IC_kwDOAMm_X85XHdca quantsnus 25102059 2023-03-09T08:41:16Z 2023-05-06T03:24:46Z CONTRIBUTOR

@Karimat22

If you are encountering an error message that says "Plotting with time-zone-aware pd.Timestamp axis not possible",

No, I don't. This is the title of the issue!

it means that you are trying to plot a Pandas DataFrame or Series

No, I don't. We are in the xarray repository!

To fix this error....

All below does not really make sense, with respect to my issue posted.

Quite frankly, your post reads like it was copy and pasted from ChatGPT or similar.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting with time-zone-aware pd.Timestamp axis not possible 1613054013
1460894580 https://github.com/pydata/xarray/issues/7593#issuecomment-1460894580 https://api.github.com/repos/pydata/xarray/issues/7593 IC_kwDOAMm_X85XE3t0 Karimat22 127195910 2023-03-08T21:23:08Z 2023-05-06T03:24:36Z NONE

If you are encountering an error message that says "Plotting with time-zone-aware pd.Timestamp axis not possible", it means that you are trying to plot a Pandas DataFrame or Series that has a time-zone-aware pd.Timestamp axis using a plotting library that does not support time zones.

To fix this error, you can convert the time-zone-aware pd.Timestamp axis to a time-zone-naive datetime object. This can be done using the tz_localize() method to set the time zone, followed by the tz_convert() method to convert to a new time zone or remove the time zone information altogether.

Here is an example:

import pandas as pd import matplotlib.pyplot as plt

Create a time-series DataFrame with a time-zone-aware pd.Timestamp axis

data = pd.DataFrame({'value': [1, 2, 3, 4]}, index=pd.date_range('2022-03-01 00:00:00', periods=4, freq='H', tz='US/Eastern'))

Convert the time-zone-aware pd.Timestamp axis to a time-zone-naive datetime object

data.index = data.index.tz_localize(None)

Plot the DataFrame using Matplotlib

data.plot() plt.show()

In this example, we create a time-series DataFrame with a time-zone-aware pd.Timestamp axis using the pd.date_range() function with the tz parameter set to 'US/Eastern'. We then use the tz_localize() method to set the time zone to None to convert the axis to a time-zone-naive datetime object. Finally, we plot the DataFrame using Matplotlib and the plot() method.

Note that converting the time-zone-aware pd.Timestamp axis to a time-zone-naive datetime object means that the time zone information is lost, so make sure that this is acceptable for your use case before making this conversion.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting with time-zone-aware pd.Timestamp axis not possible 1613054013
1461801772 https://github.com/pydata/xarray/issues/7593#issuecomment-1461801772 https://api.github.com/repos/pydata/xarray/issues/7593 IC_kwDOAMm_X85XIVMs quantsnus 25102059 2023-03-09T10:56:32Z 2023-03-09T12:31:53Z CONTRIBUTOR

I've no idea if the use of ChatGPT or other AI for replying to issues has been discussed by xarray developers yet. From my perspective use of ChatGPT or similar AI in issue replies or the like should be prohibited

@kmuehlbauer I also have no idea if this is already being discussed by xarray maintainers. I even think it should be a general policy for github, like it currently is on stackoverflow (https://meta.stackoverflow.com/questions/421831/temporary-policy-chatgpt-is-banned). But I haven't found something similar for github, not even a discussion.

If I want answers from bots I ask them directly. Or maybe github could add bot answers as a feature, clearly marked/selectable that I can decide if I read it or not. It seems we agree that people or even bots posting answers from bots is useless and a waste of time.

We are getting a bit off-topic here, but if you know or find something about how github intends to handle this I'd be happy if you share it.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting with time-zone-aware pd.Timestamp axis not possible 1613054013
1461823665 https://github.com/pydata/xarray/issues/7593#issuecomment-1461823665 https://api.github.com/repos/pydata/xarray/issues/7593 IC_kwDOAMm_X85XIaix quantsnus 25102059 2023-03-09T11:11:04Z 2023-03-09T11:11:04Z CONTRIBUTOR

To get back to original problem, I'd appreciate if someone could give a quick judgement on my proposed fix. Otherwise I would just go on in a few days creating a pull request.

Add pandas DatetimeTZDtype as a dtype to the tuple numpy_types.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting with time-zone-aware pd.Timestamp axis not possible 1613054013
1461602766 https://github.com/pydata/xarray/issues/7593#issuecomment-1461602766 https://api.github.com/repos/pydata/xarray/issues/7593 IC_kwDOAMm_X85XHknO kmuehlbauer 5821660 2023-03-09T09:00:06Z 2023-03-09T09:00:06Z MEMBER

Quite frankly, your post reads like it was copy and pasted from ChatGPT or similar.

Thanks @quantsnus for bringing this up. I've no idea if the use of ChatGPT or other AI for replying to issues has been discussed by xarray developers yet. From my perspective use of ChatGPT or similar AI in issue replies or the like should be prohibited, especially as the answer might not fit the topic (as above) or in worst case might be completely wrong. But that's just my 2c.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting with time-zone-aware pd.Timestamp axis not possible 1613054013
1460461197 https://github.com/pydata/xarray/issues/7593#issuecomment-1460461197 https://api.github.com/repos/pydata/xarray/issues/7593 IC_kwDOAMm_X85XDN6N Karimat22 127195910 2023-03-08T16:30:06Z 2023-03-08T21:24:09Z NONE

https://github.com/pydata/xarray/issues/7593#issuecomment-1460894580

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Plotting with time-zone-aware pd.Timestamp axis not possible 1613054013

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 16.184ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows