A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pandas-dev/pandas/issues/2810 below:

DataFrame constructor doesn't always upconvert datetime · Issue #2810 · pandas-dev/pandas · GitHub

import pandas as pd
ind = pd.date_range(start="2000-01-01", freq="D", periods=10)
datetimes = [ts.to_pydatetime() for ts in ind]
dates = [ts.date() for ts in ind]

df = pd.DataFrame({'datetimes': datetimes, 'dates':dates})
df.dtypes
# datetimes : object
# dates: object

Seems to be an issue with having another object dtype in the constructor. In this case dates.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4