A small, complete example of the issue


# removing tz='UTC' below resolves this problem
df1 = pd.DataFrame({'INT':[0,1], 'DATE':pd.DatetimeIndex([np.nan, np.nan], tz='UTC')})
df2 = pd.DataFrame({'INT':[0,1], 'FLOAT':[0.0, 1.0]})
df3 = df1.merge(df2, on='INT')

Expected Output

Traceback (most recent call last):

File "", line 3, in df3 = df1.merge(df2, on='INT')

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/core/frame.py", line 4330, in merge suffixes=suffixes, copy=copy, indicator=indicator)

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/tools/merge.py", line 35, in merge return op.get_result()

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/tools/merge.py", line 210, in get_result concat_axis=0, copy=self.copy)

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/core/internals.py", line 4456, in concatenate_block_managers for placement, join_units in concat_plan]

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/core/internals.py", line 4456, in for placement, join_units in concat_plan]

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/core/internals.py", line 4553, in concatenate_join_units for ju in join_units]

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/core/internals.py", line 4553, in for ju in join_units]

File "/export/data/anaconda/anaconda3.2.4/lib/python3.5/site-packages/pandas/core/internals.py", line 4801, in get_reindexed_values missing_arr = np.empty(self.shape, dtype=empty_dtype)

TypeError: data type not understood

Output of pd.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.5.2.final.0 python-bits: 64 OS: Linux OS-release: 2.6.32-431.11.2.el6.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 pandas: 0.17.1 nose: 1.3.7 pip: 8.1.2 setuptools: 26.1.1 Cython: 0.23.4 numpy: 1.11.1 scipy: 0.18.0 statsmodels: 0.6.1 IPython: 4.0.1 sphinx: 1.3.1 patsy: 0.4.0 dateutil: 2.5.3 pytz: 2016.6.1 blosc: None bottleneck: 1.0.0 tables: 3.2.2 numexpr: 2.4.4 matplotlib: 1.5.1 openpyxl: 2.2.6 xlrd: 0.9.4 xlwt: 1.0.0 xlsxwriter: 0.7.7 lxml: 3.5.0 bs4: 4.4.1 html5lib: None httplib2: None apiclient: None sqlalchemy: 1.0.10 pymysql: None psycopg2: None Jinja2: None

Comment From: jorisvandenbossche

@iyer Thanks for the report. This seems to be working correctly for me with the latest version (pandas 0.19.1). Would you be able to test with that as well?

Comment From: iyer

I don't have a pandas 0.19.1 installation - if you can get someone else to test this out, feel free to close it

Comment From: TomAugspurger

Also working for me on 0.19.1