Skip to content

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

Closed
@dpk011

Description

@dpk011

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions