Skip to content

BUG: Panel, MultiIndex, _setitem_with_indexer #5773

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

Closed
TomAugspurger opened this issue Dec 25, 2013 · 1 comment
Closed

BUG: Panel, MultiIndex, _setitem_with_indexer #5773

TomAugspurger opened this issue Dec 25, 2013 · 1 comment

Comments

@TomAugspurger
Copy link
Contributor

This creates an IndexError.

        idx = MultiIndex.from_tuples([(1, 'one'), (1, 'two'), (2, 'one'),
                                      (2, 'two')])
        df = DataFrame([[1, 'a', 1], [2, 'b', 1], [3, 'c', 1], [4, 'd', 1]],
                       columns=['A', 'B', 'C'], index=idx)
        wp = Panel({'i1': df, 'i2': df})

        wp.loc['i1', (1, 'one'), 'A'] = np.nan

Looks like its just with a Panel with a MultiIndex for one the axes (raises when following take_split_path in core.indexing._setitem_with_indexer)

In [19]: df.index = range(4)

In [20]: df
Out[20]: 
   A  B  C
0  1  a  1
1  2  b  1
2  3  c  1
3  4  d  1

[4 rows x 3 columns]

In [21]: wp = pd.Panel({'i1': df, 'i2': df})

In [22]: wp.loc['i1', 1, 'A'] = 3

In [23]: wp.loc['i1', 1, 'A']
Out[23]: 3  # correct
@jreback
Copy link
Contributor

jreback commented Jul 10, 2017

closing as Panels are deprecated

@jreback jreback closed this as completed Jul 10, 2017
@jreback jreback modified the milestones: Next Major Release, won't fix Jul 11, 2017
@TomAugspurger TomAugspurger modified the milestones: won't fix, No action Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants