Skip to content

Commit

Permalink
[fix] Level keyword is deprecated from pandas v1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaafshari committed Apr 16, 2024
1 parent 457b15f commit 7abbe00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 100-pandas-puzzles-with-solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
"df = pd.DataFrame({'grps': list('aaabbcaabcccbbc'), \n",
" 'vals': [12,345,3,1,45,14,4,52,54,23,235,21,57,3,87]})\n",
"\n",
"df.groupby('grps')['vals'].nlargest(3).sum(level=0)"
"df.groupby('grps')['vals'].nlargest(3).groupby('grps').sum()"
]
},
{
Expand Down

0 comments on commit 7abbe00

Please sign in to comment.