-
-
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
DataFrame.to_records() converts DatetimeIndex to datetime object, not np.datetime64 #18160
Comments
seems buggy |
@jreback I just discovered this was broken by #1908 (commit 38333f4) which added the It looks like the option was added in order to work around some now-ancient NumPy bug. Setting What do you think about changing the default from |
i would be in favor of deprecating that option entirely |
Does that require a DeprecationWarning first, then later removal, or should we just remove the option at once? |
FutureWarning |
I actually get a bad conversion with
|
@H0R5E is this still an issue for you? If so, can you post a reproducible example and I will try to see if I can find the problem. |
@reidy-p, sure here you go:
|
My point is that you've made a significant change of behaviour without correcting your docs. The examples show the expected output to be datetime.datetime. There is also no test for which type it should be.
I'm surprised I'm the only one to have been caught out by this. |
@H0R5E could you submit a PR fixing the docs? Thanks. |
You can remove Line 24 in 92dcf5f
|
Note this was caused by a change which conflicts with the documentation. See: pandas-dev/pandas#18160
Note this was caused by a change which conflicts with the documentation. See: pandas-dev/pandas#18160
This code:
Produces a totally different column type for the index vs the data:
It should produce:
I'm using Pandas 0.20.3, NumPy 1.13.1, and Python 3.5.3.
The text was updated successfully, but these errors were encountered: