-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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: #14016. Preserve categorical keys through concat #14035
Conversation
@@ -1637,7 +1640,10 @@ def _make_concat_multiindex(indexes, keys, levels=None, names=None): | |||
else: | |||
levels = [_ensure_index(x) for x in levels] | |||
else: | |||
zipped = [keys] | |||
if isinstance(keys, cat.CategoricalIndex): | |||
zipped = lzip(*keys) |
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 is way too special casey; needs a more general soln.
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.
I do agree, but not obvious to me what it should be
can you rebase / update? |
can you rebase / update |
can you rebase? |
@@ -1367,7 +1367,10 @@ def __init__(self, objs, axis=0, join='outer', join_axes=None, | |||
clean_keys.append(k) | |||
clean_objs.append(v) | |||
objs = clean_objs | |||
keys = clean_keys | |||
if isinstance(keys, cat.CategoricalIndex): |
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.
needs a rebase, but I think this would almost work as-is, as IIRC we do something like
keys = _ensure_index(keys)
already
rebase this, some other changes may have fixed / made this easier. |
can you rebase / update? |
can you rebase |
closing as stale |
git diff upstream/master | flake8 --diff