Get total of Pandas column

前端 未结 5 588
予麋鹿
予麋鹿 2020-11-30 18:58

Target

I have a Pandas data frame, as shown below, with multiple columns and would like to get the total of column, MyColumn.<

5条回答
  •  渐次进展
    2020-11-30 19:26

    There are two ways to sum of a column

    dataset = pd.read_csv("data.csv")

    1: sum(dataset.Column_name)

    2: dataset['Column_Name'].sum()

    If there is any issue in this the please correct me..

提交回复
热议问题