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
Many times it is desirable to be able to iterate over a small number of groups of a group by object. Currently there is no direct way to get a random sample of groups.
Similar to DataFrame.sample method, can we have Groupby.sample method which gives us a Dictionary{'group_name'->'group_labels'} containing n randomly selected groups?
Thanks for adding the sample feature into groupby. However, behaviour of the added feature is different from what I had requested.
I wanted to get a sample of groups from the groupby objects. But the added feature allows us to get a sample of records from each group of the groupby object. Is it possible to add an argument to the sample method which allows us to choose whether the sampling should be done on the groups or records of each group?
Many times it is desirable to be able to iterate over a small number of groups of a group by object. Currently there is no direct way to get a random sample of groups.
Similar to DataFrame.sample method, can we have Groupby.sample method which gives us a Dictionary{'group_name'->'group_labels'} containing n randomly selected groups?
Expected behaviour
The text was updated successfully, but these errors were encountered: