Series.combine_first() misbehaves with Timestamp data #2626

Closed
asadovsky opened this Issue Jan 2, 2013 · 2 comments

Comments

Projects
None yet
3 participants

Best illustrated by example:

In [957]: s0 = pd.Series(["2010", np.NaN])

In [958]: s1 = pd.Series([np.NaN, "2011"])

In [959]: s0.combine_first(s1)
Out[959]:
0 2010
1 2011

In [960]: s0 = pd.to_datetime(pd.Series(["2010", np.NaN]))

In [961]: s1 = pd.to_datetime(pd.Series([np.NaN, "2011"]))

In [962]: s0.combine_first(s1)
Out[962]:
0 2221-02-23 04:49:47.750490112
1 2051-05-17 05:40:40.331386880

Owner

wesm commented Jan 2, 2013

marked as bug, thanks

Contributor

changhiskhan commented Jan 20, 2013

added _where_compat in common.py that converts to i8 or python datetime first if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment