# -*- coding: utf-8 -*-
"""
Created on Mon Jun 21 12:45:55 2021

@author: Sim
"""

import pandas as pd
import numpy as np

score = [['김철수', 90, 80, 70], ['이하나', 95, 87, 55],
         ['박한기', 80, 80, 80], ['최동수', 96, 80, 90],
         ['조형남', 70, 60, 55], ['김수정', 90, 70, 77]]

df = pd.DataFrame(score)
thedf=df.loc[:,[1,2,3]]

mysum = thedf.apply(np.sum, axis = 1)
mymean = thedf.apply(np.mean, axis = 0)
   
print('Sum:\n', mysum)      
print('Mean:\n', mymean)

print(thedf.sum(axis=1))
print(thedf.mean())