Current plan of every subscriber

MediumNetflixlatest record per keydrop_duplicatesmerge· 20 XP

Some users have cancelled and signed up again, so they have more than one row in subscriptions.csv. Finance wants the number of active subscribers on each plan, based on each user's latest subscription.

Keep each user's latest subscription (the latest start_date), keep the ones that are still active (no end_date), and store the number of users per plan_name (from plans.csv) as a Series.

Expected answer

Store your answer in result.

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

import pandas as pd

subs = pd.read_csv("subscriptions.csv")
plans = pd.read_csv("plans.csv")
result = ...