3
I have a table in this format
User Material Nota
1 youtube 5
2 facebook 4
3 facebook 3
4 facebook 5
6 youtube 2
7 orkut 3
8 twitter 4
and would like to group so that in the final table shows only websites evaluated by more than 1 different user
Material User Nota
youtube 1 5
6 2
facebook 2 4
3 3
4 5
my code and my logic
import pandas as pd
df = pd.read_csv("tabela1.csv",delimiter=",")
tabela2= pd.DataFrame({'count' : df.groupby(["Material","User","Nota"]).size()})
del tabela2['count']
tabela2.to_csv('tabela_2.csv')
tabela2 = pd.read_csv("tabela_2.csv",delimiter=",")
but so it lists the ones that were evaluated by 1 user, I wonder if there is something in the group that lists only the different ones to group?
What I thought do the two for’s sit 1 fixed in the Material column and in case counting how many times each material appears after deleting the materials appearing less q twice, to treat materials with less than 1 evaluation, however I believe that for a very large base it will become very expensive in time