I have dataframe like this.
E F
ID A B C D E F
0 0 ABC AAA BCD 1 -
1 1 ABC AAA BCD 4 -
2 2 ABC AAA BCD 6 -
I print type of dataframe by print(type(df['E'])) it show output like this.
<class 'pandas.core.series.Series'>
I try to sum total value in column E but it show output like this
E146
How to sum data in dataframe column? The correct value should be 11 (1+4+6).
df['E'][-3]and sum. The sum function is not working properly on because of the singleEcharacter present in the columnEof your dataframe. In that case it concatenates the values of the column which results in the outputE146.