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 "
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
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
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()
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