I am trying to calculate sum of column_name "Email" and trying to groupby column_name "country". The error is in converting str to int
Script:
df3 = pd.read_csv('hi.csv',sep = ',')
df3['h1'] = df3['h1'].astype(int)
new_df3=df3.groupby(['country']).h1.sum().to_frame('count').reset_index()
print(new_df3)
Input:
cou h1
A hi
C watsup
G hi