We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import pandas as pd ind = pd.date_range(start="2000-01-01", freq="D", periods=10) datetimes = [ts.to_pydatetime() for ts in ind] datetime_s = pd.Series(datetimes) datetime_s.dtype # object df = pd.DataFrame({'datetime_s':datetime_s}) print df.dtypes #datetime64
Shouldn't Series upconvert to datetime64 since the DataFrame columns do?
The text was updated successfully, but these errors were encountered:
yes...see #2752 (not merged yet
Sorry, something went wrong.
In [11]: pd.Series(datetimes) Out[11]: 0 2000-01-01 00:00:00 1 2000-01-02 00:00:00 2 2000-01-03 00:00:00 3 2000-01-04 00:00:00 4 2000-01-05 00:00:00 5 2000-01-06 00:00:00 6 2000-01-07 00:00:00 7 2000-01-08 00:00:00 8 2000-01-09 00:00:00 9 2000-01-10 00:00:00 In [12]: pd.Series(datetimes).dtype Out[12]: dtype('datetime64[ns]')'' In [13]: pd.DataFrame({'datetime_s' : datetimes}).dtypes Out[13]: datetime_s datetime64[ns]
ooh, sweet. Didn't see the PR. Well, now it gets to close more bugs!
TST: added addtl datetimes test in construction (ref GH pandas-dev#2809…
5c85a80
…/2810)
TST: added addtl datetimes test in construction (ref GH #2809/2810)
6cae445
this is all set now that the PR is merged
No branches or pull requests
Shouldn't Series upconvert to datetime64 since the DataFrame columns do?
The text was updated successfully, but these errors were encountered: