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

BUG GH11693 Support NaT series concatenation #11705

Closed

Conversation

varunkumar-dev
Copy link
Contributor

Please review .

Closes #11693

@varunkumar-dev varunkumar-dev force-pushed the fix_NaT_error branch 2 times, most recently from 97c086d to ae8e426 Compare November 26, 2015 03:12
@varunkumar-dev varunkumar-dev changed the title Fix to #11693 BUG GH11693 Support NaT series concatenation Nov 27, 2015
@varunkumar-dev varunkumar-dev force-pushed the fix_NaT_error branch 3 times, most recently from 4cbbd0b to 681cf58 Compare November 27, 2015 05:47
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])
Copy link
Contributor

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

@jreback
Copy link
Contributor

jreback commented Nov 27, 2015

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])
Copy link
Contributor

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.

Copy link
Contributor

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).

Copy link
Contributor

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)

@jreback jreback added Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Nov 27, 2015
@jreback jreback added this to the 0.18.0 milestone Nov 27, 2015
@jreback jreback added the Timezones Timezone data dtype label Nov 27, 2015
@jreback
Copy link
Contributor

jreback commented Dec 16, 2015

can you update according to comments

@varunkumar-dev
Copy link
Contributor Author

apologies for the delay. Will fix over the weekend.

@@ -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)
Copy link
Contributor

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

@jreback
Copy link
Contributor

jreback commented Jan 20, 2016

can you update

@jreback
Copy link
Contributor

jreback commented Feb 1, 2016

superseded by #12195

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants