diff --git a/src/jupyter_contrib_nbextensions/nbextensions/snippets_menu/snippets_submenus_python/pandas.js b/src/jupyter_contrib_nbextensions/nbextensions/snippets_menu/snippets_submenus_python/pandas.js index 74994ba0e..950b3e777 100644 --- a/src/jupyter_contrib_nbextensions/nbextensions/snippets_menu/snippets_submenus_python/pandas.js +++ b/src/jupyter_contrib_nbextensions/nbextensions/snippets_menu/snippets_submenus_python/pandas.js @@ -116,11 +116,11 @@ define({ 'sub-menu' : [ { 'name' : 'Split-apply-combine (sum)', - 'snippet' : ['df['label_count'] = df.groupby('label', as_index=False)['label'].transform(lambda x: x.count())',], + 'snippet' : ['df["label_count"] = df.groupby("label", as_index=False)["label"].transform(lambda x: x.count())',], }, { 'name' : 'Split-apply-combine (mean)', - 'snippet' : ['df['label_mean'] = df.groupby('label', as_index=False)['label'].transform(lambda x: x.mean())',], + 'snippet' : ['df["label_mean"] = df.groupby("label", as_index=False)["label"].transform(lambda x: x.mean())',], }, ], },