Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Series.combine_first() misbehaves with Timestamp data #2626

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

Series.combine_first() misbehaves with Timestamp data #2626

asadovsky opened this issue Jan 2, 2013 · 2 comments
Labels
Bug Datetime Datetime data dtype
Milestone

Comments

@asadovsky
Copy link

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

@wesm
Copy link
Member

wesm commented Jan 2, 2013

marked as bug, thanks

@changhiskhan
Copy link
Contributor

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
Labels
Bug Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

3 participants