-
- Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
Milestone
Description
xref #21573 (comment)
In [2]: df = pd.DataFrame({'group': [1, 1, 2], 'category_string': pd.Series(list('abc')).astype('category'), 'datetimetz': pd.date_range('20130101', periods=3, tz='US/Eastern')}) In [3]: df.groupby('group').first() Out[3]: category_string datetimetz group 1 a 2013-01-01 05:00:00 2 c 2013-01-03 05:00:00 The example above passes data through the first/last compat method which strips timezone information. PR #15885 (now closed) should fix this issue (and offer a performance boost to Categorial data as mentioned in #19026)
reidy-p