Skip to content

BUG/VIS: groupby.hist/plot() should pass group keys as labels #6279

Closed
@TomAugspurger

Description

@TomAugspurger

At least wherever possible.

In [2]: df = pd.DataFrame(np.random.randn(30, 2), columns=['A', 'B'])

In [3]: df['C'] = 15 * ['a'] + 15 * ['b']

In [4]: ax = df.groupby('C')['A'].hist()

hist_leg
Ideally the group keys would be the legend for the plot.
I can take this one.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions