-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: MultiIndex truncated for some non-list arguments #14806
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
Conversation
string_and_binary_types = string_types + (binary_type,) | ||
|
||
|
||
class ABC(object): |
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.
revert all this. way out of scope for this issue.
@@ -10,7 +10,7 @@ | |||
import pandas.index as _index | |||
from pandas.lib import Timestamp | |||
|
|||
from pandas.compat import range, zip, lrange, lzip, map |
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.
just import directly from itertools
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.
zip_longest changed names between Python 2/3 (it was izip_longest in Python 2)
MultiIndex.from_product : Make a MultiIndex from cartesian product | ||
of iterables | ||
""" | ||
try: | ||
arrays = list(arrays) |
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.
revert
else: | ||
arrays = lzip(*tuples) | ||
|
||
arrays = zip_longest(*tuples) |
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.
revert all except for this change here
pls add tests first. just make the simple change and get it to work. then you can do follows to restructure if necessary / more clear. There are a lot of things going going on here (IOW lots of routines hit this), and lots of variations of accepted, so need to be quite careful (and more so about performance). |
Thank you. I guess I got carried away. I'll do a fresh start and open a new PR. |
closes #14794.
WIP. Discussion/suggestions welcome.