10000 Preserve EA dtype in DataFrame.stack by TomAugspurger · Pull Request #23285 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Preserve EA dtype in DataFrame.stack #23285

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 16 commits into from
Nov 8, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove pdb
  • Loading branch information
TomAugspurger committed Oct 24, 2018
commit d6661cb6490916b808b2f9c0ac650bec56ad8cf7
3 changes: 0 additions & 3 deletions pandas/core/reshape/reshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,10 +603,8 @@ def _convert_level_number(level_num, columns):
# indexer
if not isinstance(loc, slice):
slice_len = len(loc)
locs = list(loc)
else:
slice_len = loc.stop - loc.start
locs = list(range(loc.start, loc.stop))

if slice_len != levsize:
chunk = this.loc[:, this.columns[loc]]
Expand All @@ -615,7 +613,6 @@ def _convert_level_number(level_num, columns):
else:
if (frame._is_homogeneous_type and
is_extension_array_dtype(frame.dtypes.iloc[0])):
import pdb; pdb.set_trace()
dtype = this.loc[:, this.columns[loc]].dtypes.iloc[0]
subset = this.loc[:, this.columns[loc]]

Expand Down
0