Skip to content
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

Setting the label parameter in the call to DF.plot alters the DataFrame's index name #8494

Closed
dpk011 opened this issue Oct 6, 2014 · 1 comment · Fixed by #8541
Closed
Labels
Milestone

Comments

@dpk011
Copy link

dpk011 commented Oct 6, 2014

Setting the label parameter in the call to df.plot alters the DataFrame's index name. For example,

df = pd.DataFrame(data=np.random.rand(5,3), index=np.arange(5), columns=['A', 'B', 'C'])
df.index.name='RowNumber'
df.plot(y='B', label='Test')
print df.index.name

Out[1]: Test

See a better example at StackOverflow.
An answer in above link points problem to here.
pandas version 0.14.1.

@TomAugspurger TomAugspurger added this to the 0.15.1 milestone Oct 7, 2014
@TomAugspurger
Copy link
Contributor

Thanks for the report. The easiest fix would probably be to copy the series. Interested in doing a pull request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants