You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importpandasaspdd= {'one' : ['A', 'A', 'B', 'B', 'C'],
'two' : [4., 3., 2., 2, 1],
'three' : [10., 8., 3, 5, 7.]}
df=pd.DataFrame(d)
# this worksdf.hist('two', by='one', bins=range(0, 10))
# this does not work (everything in one plot), also no way to specify columndf.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 :)
The text was updated successfully, but these errors were encountered:
Related to #8018 (internally it splits data to groups).
by behaves differently in df.hist (subplots) and df.box (grouping in a sincle ax). Thus, I don't think porting these behavior to plot is not good idea. We should decide how by should work.
Oh! I missed your work completely when looking through the pull requests. It looks really nice.
I did not know about the groupby().hist, or groupby().plot.hist. I guess I would expect if having the by-keyword, we would get the same results.
Also, can you take a look at my pull request: #11441
I am trying to get a better implementation of the weighs keyword, and also work even though you have different nan's in the data & weights. But if this could be integrated in your solution I would be sooo happy
@sinhrks I tried to pull your changes into my own dev environment to test out various things with weighs, but alas I failed :(
I did not find your group by repository. Can you publish it again? It would be really really fun trying your great looking additions out in the hope I can contribute a little back.
Found this when working on
#11441
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 :)
The text was updated successfully, but these errors were encountered: