I have a dataframe like this
import pandas as pd
data = {'Index Title' : ["Company1", "Company1", "Company2", "Company3"],
'BusinessType' : ['Type 1', 'Type 2', 'Type 1', 'Type 2'],
'ID1' : ['123', '456', '789', '012']
}
df = pd.DataFrame(data)
df.index = df["Index Title"]
del df["Index Title"]
print(df)
where Index Title is a company name. For Company 1 I have two types - Type 1 and Type 2.
For Company 2 I have only Type 1 And for Company 3 I have only Type 2.
I would like to drop those rows where there is only one type - Type 1 or Type 2.
So in this case it should drop Company 2 and Company 3.
Could you please help me what is the best way to do that?