-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't plot pd.Timedelta (or numpy.timedelta64) versus time #9154
Comments
dupe of #8711 |
pandas doesn't suooort plotting timedeltas out of the box |
ok. thanks for the quick response. Is there an easy/best practice workaround? I tried with |
@drevicko -- try |
@pratapvardhan Thanks, I like plotting the with the kernel density estimate |
So closing as duplicate of #16953 (which was actually also opened by @scls19fr). |
I didn't remembered this 2014 bug when I opened #16953. I'm sorry about this duplicate. |
Ah sorry, didn't see this issue was from 2014, I thought it was opened today :-) You are certainly correct about it not being very informative. So PR #15067 added better formatting, but I suppose only for the x axis. Do you want to open an issue to generalize this better timedelta formatting to all cases ? |
I'm currently building latest Pandas (with a MacBook Air)... so it may be long. |
Hello,
I did
but it raises
Empty 'Series': no numeric data to plot
I don't understand if data inside
diff_dt
columns arenumpy.timedelta64
orpd.Timedelta
raises
AttributeError: 'numpy.timedelta64' object has no attribute 'value'
but it seems that I can get
value
for a given data (let's say row 10)I don't understand why...
But I also don't understand how I could plot diff_dt column without doing an uggly:
But I don't know how I could automatically get this
np.timedelta64(1, 'ns')
Maybe Pandas could plot Timedelta (or
np.timedelta64
) out of the box ?because that's interesting to know for example if sampling period is constant.
Kind regards
The text was updated successfully, but these errors were encountered: