Skip to content

By-keyword, Inconcistencies between the new df.plot.hist and its df counterpart #11483

Open
@Twizzledrizzle

Description

@Twizzledrizzle

Found this when working on

#11441

import pandas as pd
d = {'one' : ['A', 'A', 'B', 'B', 'C'],
     'two' : [4., 3., 2., 2, 1],
     'three' : [10., 8., 3, 5, 7.]}     
df = pd.DataFrame(d)

# this works
df.hist('two', by='one', bins=range(0, 10))

# this does not work (everything in one plot), also no way to specify column
df.plot.hist(by='one', bins=range(0, 10))

My idea was to make the df.plot.hist version similar to the df.hist. But the code is much more complex. Would it not be best to point the df.plot.hist to the df.hist version? Instead of having two separate logics for this?

Oh, and the by keyword does not seem to work for df.plot.box, have not found any it worked for. At least the way I expected it to work :)

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