Dtype lost in pandas comb_first

I ran into strange behavior when using comb_first for two series (pandas version 0.14.1). s1 and s2 are of type int32. The resulting series is of type float. This does not happen when using, for example, CONCAT. I wonder if I misunderstood something or stumbled upon an error?

I read this thread but it looks like it is something else: pandas DataFrame comb_first and update methods have strange behavior

import pandas as pd
from pandas import Series

s1 = Series(range(0, 5), index=pd.date_range('20140903', periods=5, freq='d'))
s2 = Series(range(0, 5), index=pd.date_range('20140901', periods=5, freq='d'))

print s1.combine_first(s2)

      

+3


source to share





All Articles