-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
BUG: Fixed float parsing with unit when using pd.to_datetime (GH13834) #13847
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
Conversation
Current coverage is 85.30% (diff: 100%)@@ master #13847 diff @@
==========================================
Files 139 139
Lines 50157 50157
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 42785 42784 -1
- Misses 7372 7373 +1
Partials 0 0
|
doc/source/whatsnew/v0.19.0.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pandas/tslib.pyx
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should actually be casting='same_kind'. You can also add copy=False to avoid a copy in the case where the values are already int64.
In [35]: a = np.array([1, 2, 3], dtype='int32')
In [36]: a.astype('int64', casting='no')
TypeError Traceback (most recent call last)
<ipython-input-36-efb09bba64c8> in <module>()
----> 1 a.astype('int64', casting='no')
TypeError: Cannot cast array from dtype('int32') to dtype('int64') according to the rule 'no'
In [37]: a.astype('int64', casting='same_kind')
Out[37]: array([1, 2, 3], dtype=int64)|
Having trouble w/ my laptop recently, so sorry for slow response. Please lmk if there's anything else, I will try to fix anything asap. Thanks for the suggestion @chris-b1 |
|
@jreback everything good here? |
doc/source/whatsnew/v0.19.0.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
be much more explict here, this is only when unit specified.
|
lgtm. ping when fixed / green. |
|
just about to merge this and I saw: |
git diff upstream/master | flake8 --diff