Dtype inconsistency when appending to empty dataframe #22621
Labels
Bug
Dtype Conversions
Unexpected or buggy dtype conversions
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Code Sample, a copy-pastable example if possible
Problem description
I would expect append not to change the dtype of the a column from
int
tofloat
, and for the output to be identical to that ofpd.concat([pd.DataFrame(), pd.DataFrame([{"a": 1}])])
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit: 4612312
python: 2.7.13.final.0
python-bits: 64
OS: Darwin
OS-release: 15.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None
pandas: 0.24.0.dev0+547.g4612312
pytest: None
pip: 18.0
setuptools: 34.3.3
Cython: 0.25.2
numpy: 1.13.3
scipy: 1.1.0
pyarrow: None
xarray: None
IPython: 5.3.0
sphinx: None
patsy: None
dateutil: 2.6.0
pytz: 2017.3
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.9999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
The text was updated successfully, but these errors were encountered: