We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6af8e5e commit d0fb866Copy full SHA for d0fb866
src/jupyter_contrib_nbextensions/nbextensions/snippets_menu/snippets_submenus_python/pandas.js
@@ -113,7 +113,16 @@ define({
113
114
{
115
'name' : 'Combining',
116
- 'snippet' : ['',],
+ 'sub-menu' : [
117
+ {
118
+ 'name' : 'Split-apply-combine (sum)',
119
+ 'snippet' : ['df['label_count'] = df.groupby('label', as_index=False)['label'].transform(lambda x: x.count())',],
120
+ },
121
122
+ 'name' : 'Split-apply-combine (mean)',
123
+ 'snippet' : ['df['label_mean'] = df.groupby('label', as_index=False)['label'].transform(lambda x: x.mean())',],
124
125
+ ],
126
},
127
128
0 commit comments