[Python] 07. pandas Series 통계/시각화 : idxmax(),idxmin(),nlargest(),nsmallest(),quantile(),cut(),to_csv() 예제
import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib import rc import matplotlib rc('font', family='AppleGothic') plt.rcParams['axes.unicode_minus'] = False data = {'aa':10,'bb':20,'cc':30,'dd':40,'ee':50} sr = pd.Series(data, name='국어점수') sr [OUT] : aa 10 bb 20 cc 30 dd 40 ee 50 Name: 국어점수, dtype: int64 sr.idxmax() # numpy에서는 argmax()이고 pandas에서는 idxmax() [OUT]..