Top creator in each category

MediumTikTokmergegroupbyrank· 20 XP

The creator programme wants to invite the most watched creator in every category.

Join views.csv to videos.csv, count views per category and creator_id, and store the creator(s) ranked 1 in each category, with columns category, creator_id and views. If creators tie for first, keep them all.

Expected answer

Store your answer in result.

Hints, the later steps and the answer come with Pro.

import pandas as pd

views = pd.read_csv("views.csv")
videos = pd.read_csv("videos.csv")
result = ...