Data Science, Python, Pandas.
this: max_n_filter = summed_articles.reset_index()\ .groupby(‘article’)\ .idxmax() Let’s preview the filter first: Now we can filter out the summed_articles rows with this table: summed_articles.iloc[max_n_filter[‘n’]].head(4) Finally, we need to sort the values by the highest number of visitors: