DataFrame.combine_first turns timestamp columns into float columns #27364
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Duplicate Report
Duplicate issue or pull request
Regression
Functionality that used to work in a prior pandas version
Code Sample, a copy-pastable example if possible
Problem description
In version
0.23.4
, the code above works. Starting with release0.24.0rc1
, this code breaks.The problem is that a when you call
x.combine_first(y)
andy
has timestamp columns that are not present at all inx
, the result will have those columns cast tofloat64
. That might be fine, but the fact that behavior changed without warning in0.24.0rc1
makes it seem like a bug, especially sincecombine_first
has special case handling for timestamp-like columns.Expected Output
Output of
pd.show_versions()
pandas: 0.23.4
pytest: 4.5.0
pip: 19.0.3
setuptools: 40.8.0
Cython: 0.27.1
numpy: 1.16.2
scipy: 1.2.1
pyarrow: 0.14.0
xarray: 0.12.1
IPython: 7.4.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2019.1
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.3
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 1.0.1
sqlalchemy: 1.3.2
pymysql: None
psycopg2: 2.7.7 (dt dec pq3 ext lo64)
jinja2: 2.8.1
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: