Let a data frame be like the following:
import pandas as pd
df = pd.DataFrame({"name":["A", "A", "B" ,"B", "C", "C"],
"nickname":["X","Y","X","Z","Y", "Y"]}
How can I group df and drop those groups (C) that do not contain at least one 'X'?
thank you