You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/pwaller/.local/src/pandas/pandas/core/strings.py", line 1432, in partitionreturnself._wrap_result(result, expand=expand)
File "/home/pwaller/.local/src/pandas/pandas/core/strings.py", line 1348, in _wrap_resultreturn MultiIndex.from_tuples(result, names=name)
File "/home/pwaller/.local/src/pandas/pandas/indexes/multi.py", line 889, in from_tuplesreturn MultiIndex.from_arrays(arrays, sortorder=sortorder, names=names)
File "/home/pwaller/.local/src/pandas/pandas/indexes/multi.py", line 844, in from_arrays
names=names, verify_integrity=False)
File "/home/pwaller/.local/src/pandas/pandas/indexes/multi.py", line 92, in __new__
result._set_names(names)
File "/home/pwaller/.local/src/pandas/pandas/indexes/multi.py", line 446, in _set_namesraiseValueError('Length of names must match number of levels in 'ValueError: Length of names must match number of levels in MultiIndex.
I bisected the problem to 3ab35b4 (cc @sinhrks). The problem is not present in 0.17.1 and is present in 0.18.0rc2.
Note: when I use a name="foo", it happens to work because it has the correct length, the index name ends up being ["f", "o", "o"], so it's possible this is tested somewhere and happens to work even though it's not correct for a large number of use cases.
The text was updated successfully, but these errors were encountered:
pwaller
changed the title
REGR: Index.str.partition stopped working
REGR: Index.str.partition gives ValueError while trying to compute index name
Mar 14, 2016
Tthis is not a regression. The name argument you were using in 0.17.1 didn't do anything (a MultiIndex does not have a name, only names for the levels),
jreback
changed the title
REGR: Index.str.partition gives ValueError while trying to compute index name
BUG: Index.str.partition gives ValueError while trying to compute index name (expand=False)
Mar 14, 2016
Index.str.partition
's behaviour changed in 3ab35b4 in a backwards incompatible way which doesn't seem intentional.Code Sample, a copy-pastable example if possible
Expected Output
Versions
I bisected the problem to 3ab35b4 (cc @sinhrks). The problem is not present in 0.17.1 and is present in 0.18.0rc2.
Note: when I use a
name="foo"
, it happens to work because it has the correct length, the index name ends up being["f", "o", "o"]
, so it's possible this is tested somewhere and happens to work even though it's not correct for a large number of use cases.The text was updated successfully, but these errors were encountered: