Skip to content

BUG: TypeError in index coercion #12916

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
wants to merge 1 commit into from
Closed

Conversation

mcwitt
Copy link
Contributor

@mcwitt mcwitt commented Apr 17, 2016

@@ -2410,6 +2410,14 @@ def test_repeat(self):
m_df = pd.Series(data, index=m_idx)
assert m_df.repeat(3).shape == (3 * len(data), )

def test_rangeindex_fallback_coercion_bug(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I think this would be betterin pandas/tests/indexes/test_multi.py as it directly affects that.

@jreback jreback added Bug MultiIndex Compat pandas objects compatability with Numpy or Python functions labels Apr 17, 2016
@jreback jreback added this to the 0.18.1 milestone Apr 17, 2016
@jreback
Copy link
Contributor

jreback commented Apr 17, 2016

small change, lgtm otherwise. ping when green.

@mcwitt mcwitt force-pushed the mi-bug branch 3 times, most recently from 5b38bab to 2f20df4 Compare April 17, 2016 20:47
@mcwitt mcwitt changed the title Fix incorrect arg, add test BUG: TypeError in index coercion Apr 17, 2016
@jreback
Copy link
Contributor

jreback commented Apr 18, 2016

looks like a PEP issue. can you fix and push. ping when green.

bar = pd.DataFrame(np.arange(100).reshape((10,10)))
df = pd.concat({'foo': foo.stack(), 'bar': bar.stack()}, axis=1)
df.index.names = ['fizz','buzz']
df.index.get_level_values('fizz')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compare this to the correct values here.

@jreback
Copy link
Contributor

jreback commented Apr 20, 2016

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Compat pandas objects compatability with Numpy or Python functions MultiIndex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Related TypeErrors in multi-indexed DataFrame
2 participants