import pandas as pd
import os

file = "~/Downloads/Anthology-EngageT1T2-MCA-CSV.csv"
df = pd.read_csv(file)
df["engage"] = df["Groups"].str.contains("(T2)")
# print(df["engage"].value_counts())
print(df["Domain"].value_counts())
df.sort_values("Email", inplace=True)
df.drop_duplicates(subset="Email", keep=False, inplace=True)
print(df["Domain"].value_counts())

# df2 = df[[ "Domain", "Groups" ]].copy()
# print(df2)

# accounts = df["Domain"].unique().tolist()
# for x in accounts:
#     df_dict = {name: df.loc[df["Domain"] == name] for name in accounts}
