Wednesday 15 August 2012

python - dtype lost in pandas combine_first -



python - dtype lost in pandas combine_first -

i encountered unusual behavior when using combine_first 2 series (pandas version 0.14.1). s1 , s2 both of type int32. resulting series of type float. doesn't happen when using e.g. concat. wonder, did misunderstand or stumble across bug?

i have read thread, seems else: pandas dataframe combine_first , update methods have unusual behavior

import pandas pd 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)

python join pandas concat series

No comments:

Post a Comment