0
import pandas as pd

df = pd.DataFrame(
    {'Type': ['Plastic', 'Iron', 'Plastic', 'Gum', 'Copper', 'Copper'],
    'size': [2,4,3,2,1,2],
    }
)

I have this dataframe and i want to get a filtered dataframe, whcih only contains rows, thats size occurs 3 times in the dataframe. In this case, i have to get

Type [Plastic, Gum, Copper] size [2, 2, 2]

as a result.

Does anyone know, how i can resolve this issue?

0 Answers0