I have a csv file in this format:
| file_name | pred_class |
|---|---|
| First | pound |
| Second | sterling |
| Third | pound |
| Fourth | pound |
After loading the file via pandas, and running this code:
total = (df['pred_class'] == 'pound').sum()
print(total)
I get this error
raise UnsupportedArrayTypeException(type_name) console_thrift.UnsupportedArrayTypeException: UnsupportedArrayTypeException(type='int64')
Can you tell me how to correctly get the sum without this error?
Thanks!