Pandas histogram df.hist() group by
问题 How to plot a histogram with pandas DataFrame.hist() using group by? I have a data frame with 5 columns: "A", "B", "C", "D" and "Group" There are two Groups classes: "yes" and "no" Using: df.hist() I get the hist for each of the 4 columns. Now I would like to get the same 4 graphs but with blue bars (group="yes") and red bars (group = "no"). I tried this withouth success: df.hist(by = "group") 回答1: This is not the most flexible workaround but will work for your question specifically. def