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
A merge or join involving a left DataFrame that has single precision floats will fail. Seems to be OK if the right dataframe has float32; these get cast to float64 (which they probably shouldn't be)
importnumpyasnpimportpandasa=np.random.randint(0, 5, 100)
df=pandas.DataFrame({'a': a})
s=pandas.DataFrame( pandas.Series(np.random.random(5).astype('f'), name='md') )
df.merge(s, left_on='a', right_index=True) # this is OKdf['b'] =np.random.randint(0, 5, 100)
df.merge(s, left_on='a', right_index=True) # this is OKdf['c'] =np.random.random(100).astype('Float64')
df.merge(s, left_on='a', right_index=True) # this is OKdf['d'] =np.random.random(100).astype('Float32')
printdf.dtypesdf.merge(s, left_on='a', right_index=True) # this fails
The text was updated successfully, but these errors were encountered:
A merge or join involving a left DataFrame that has single precision floats will fail. Seems to be OK if the right dataframe has float32; these get cast to float64 (which they probably shouldn't be)
The text was updated successfully, but these errors were encountered: