Skip to content

BUG: unstack with object dtype of tzaware timestamps #41875

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

Merged
merged 9 commits into from
Jun 17, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@@ -1095,6 +1095,7 @@ Reshaping
- Bug in :func:`to_datetime` raising an error when the input sequence contained unhashable items (:issue:`39756`)
- Bug in :meth:`Series.explode` preserving the index when ``ignore_index`` was ``True`` and values were scalars (:issue:`40487`)
- Bug in :func:`to_datetime` raising a ``ValueError`` when :class:`Series` contains ``None`` and ``NaT`` and has more than 50 elements (:issue:`39882`)
- Bug in :meth:`Series.unstack` and :meth:`DataFrame.unstack` with object-dtype values containing timezone-aware datetime objects incorrectly raising ``TypeError`` (:issue:`41875`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did we not have a test that changed for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we recently changed the test for period and interval. This makes the same change to that test for dt64tz

@jreback jreback added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype labels Jun 8, 2021
@jreback jreback added this to the 1.3 milestone Jun 16, 2021
@jreback
Copy link
Contributor

jreback commented Jun 16, 2021

this is ok for 1.3, can you rebase

@jreback jreback merged commit cf5852b into pandas-dev:master Jun 17, 2021
@jreback
Copy link
Contributor

jreback commented Jun 17, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 17, 2021

Something went wrong ... Please have a look at my logs.

@jbrockmendel jbrockmendel deleted the bug-unstack-dt64tz branch June 17, 2021 00:49
simonjayhawkins pushed a commit that referenced this pull request Jun 17, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
@pcorpet
Copy link
Contributor

pcorpet commented Jun 27, 2024

It seems that it's not fixed for the case where mask_all is true. I'll send another PR

new_values = np.empty(result_shape, dtype=dtype)

pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 27, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 27, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 27, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 28, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 28, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 28, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 28, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 28, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 28, 2024
pcorpet added a commit to pcorpet/pandas that referenced this pull request Jun 29, 2024
mroeschke pushed a commit that referenced this pull request Jun 29, 2024
BUG: `pivot_table` chokes on pd.DatetimeTZDtype if there are no rows.

This is a follow up to #41875
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants