-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
BUG GH11693 Support NaT series concatenation #11705
Conversation
97c086d
to
ae8e426
Compare
4cbbd0b
to
681cf58
Compare
y = pd.Series( pd.date_range('20151124 10:00', '20151124 11:00', freq = '1h', tz = "US/Eastern") ) | ||
y[:] = pd.NaT | ||
xy = pd.concat([x,y]) | ||
tm.assert_equal(xy[0], x[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use tm.assert_series_equal
& construct the expected series
couple comments, pls add a whatsnew note |
x = pd.Series( pd.date_range('20151124 08:00', '20151124 09:00', freq = '1h', tz = "US/Eastern") ) | ||
y = pd.Series( pd.date_range('20151124 10:00', '20151124 11:00', freq = '1h', tz = "US/Eastern") ) | ||
y[:] = pd.NaT | ||
xy = pd.concat([x,y]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not 100% sure that we have all of these tests, so can you add this for no-tz's as well, and both series all-nat (both with and w/o tz's). use a loop to check all 4 conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
further a concat of tz-aware and (different tz or no tz) should result in object
(works, just put all tests in the same place).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we have other tests in merge which test this kind of thing, pls move to a similar location (I don't know if we do)
can you update according to comments |
apologies for the delay. Will fix over the weekend. |
8b9a0de
to
49c4321
Compare
49c4321
to
b4e0ff0
Compare
b4e0ff0
to
1362361
Compare
@@ -955,8 +955,12 @@ def get_result(self): | |||
|
|||
# stack blocks | |||
if self.axis == 0: | |||
new_data = com._concat_compat([x._values for x in self.objs]) | |||
to_concat = [x._values for x in self.objs] | |||
typs = com.get_dtype_kinds(to_concat) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be fixed solely in _concat_compat
can you update |
superseded by #12195 |
Please review .
Closes #11693