Closed
Description
In [12]: pd.__version__
Out[12]: '0.24.0.dev0+1040.g24bce1a5f'
In [13]: df = pd.DataFrame({'year': [2015, 2016],
...: 'month': [2, 3],
...: 'day': [4, 5]})
...:
In [14]: pd.to_datetime(df, box=False)
Out[14]:
0 2015-02-04
1 2016-03-05
dtype: datetime64[ns]
In [15]: pd.to_datetime(df, utc=True)
Out[15]:
0 2015-02-04
1 2016-03-05
dtype: datetime64[ns]
These arguments need to be handled directly in this function or the output
pandas/pandas/core/tools/datetimes.py
Line 574 in 24bce1a
Expected Output
In [16]: pd.to_datetime(df, box=False).values
Out[16]:
array(['2015-02-04T00:00:00.000000000', '2016-03-05T00:00:00.000000000'],
dtype='datetime64[ns]')
In [17]: pd.to_datetime(df, utc=True).dt.tz_localize('UTC')
Out[17]:
0 2015-02-04 00:00:00+00:00
1 2016-03-05 00:00:00+00:00
dtype: datetime64[ns, UTC]