Dear all,
I am a new joiner in the python community.
In the following python I am simply counting the number of company in an excel…but I would like to show only the companies with more than 1 count.
Current python:
`
import pandas as pd
data = pd.read_excel (r'/Users//Documents/Test_python.xlsx', sheet_name='Feuil1')
df = pd.DataFrame(data, columns= ['Company','volume'])
dt = df['Company'].value_counts()
print(dt)
`
Current result:
Swiss Re 63
MS 63
Allianz 53
Liverpool 48
Mancherster 15
Conoco 4
Zurich 3
HSBC 1
Goldman Sachs 1
Name: Company, dtype: int64
Expected result:
Swiss Re 63
MS 63
Allianz 53
Liverpool 48
Mancherster 15
Conoco 4
Zurich 3
Name: Company, dtype: int64
Thank you for your help!
Best
T