issue_comments: 417337306
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/1143#issuecomment-417337306 | https://api.github.com/repos/pydata/xarray/issues/1143 | 417337306 | MDEyOklzc3VlQ29tbWVudDQxNzMzNzMwNg== | 12130884 | 2018-08-30T14:21:55Z | 2018-08-30T14:21:55Z | NONE | Pardon me for extending this discussion. I encountered the same problem when calculating timedelta in a dataframe. It even ended with an error when I tried to call the days attribute. I am using Numpy 1.6.1 AttributeError: 'Series' object has no attribute 'days' Problem df_trans['DELTA'] = df_trans['DATE2'] - df_trans['DATE1'] print df_trans['DELTA'].dtype
print df_trans['DELTA']
df_trans['DELTA'] = df_trans['DELTA'].astype('timedelta64[D]') print df_trans['DELTA'].dtype
print df_trans['DELTA']
print df_trans['DELTA'].days
I get rid of the problem by putting it in to a list for the conversion.
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
192325490 |