You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a note that this is handled correctly for Series:
In [18]: a=pd.Series(pd.date_range('2000', periods=4, tz='UTC'))
In [19]: b=pd.Series([])
In [20]: pd.concat([a, b]).dtypeOut[20]: datetime64[ns, UTC]
In [21]: pd.concat([a.to_frame(), b.to_frame()]).dtypesOut[21]:
0objectdtype: object
So Out[20] is correct, but the DataFrame version is not.
This looks correct from Tom's example now. Could use a test
In [10]: In [18]: a = pd.Series(pd.date_range('2000', periods=4, tz='UTC'))
...:
...: In [19]: b = pd.Series([])
<ipython-input-10-74472f1f757a>:3: DeprecationWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
b = pd.Series([])
In [11]: pd.concat([a.to_frame(), b.to_frame()]).dtypes
Out[11]:
0 datetime64[ns, UTC]
dtype: object
In [12]: pd.__version__
Out[12]: '1.3.0.dev0+1287.g895f0b4022'
xref #9149
The resultant has all missing and when concat with an empty frame should result in the same dtype (and not promotion)
The text was updated successfully, but these errors were encountered: