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
<div><h3id="groupby">GroupBy</h3><p><strong>Object that groups together rows of a dataframe based on the value of the passed column.</strong></p><pre><codeclass="python language-python hljs"><GB> = <DF>.groupby(col_key/s) <spanclass="hljs-comment"># Splits DF into groups based on passed column.</span>
2749
2749
<DF> = <GB>.apply(<func>) <spanclass="hljs-comment"># Maps each group. Func can return DF, S or el.</span>
2750
+
<DF> = <GB>.filter(<func>) <spanclass="hljs-comment"># Drops a group if function returns False.</span>
2750
2751
<DF> = <GB>.get_group(<el>) <spanclass="hljs-comment"># Selects a group by grouping column's value.</span>
2751
2752
<S> = <GB>.size() <spanclass="hljs-comment"># S of group sizes. Same keys as get_group().</span>
2752
2753
<GB> = <GB>[col_key] <spanclass="hljs-comment"># Single column GB. All operations return S.</span>
0 commit comments