데이터 조작 및 분석을 위한 Pandas 심화
데이터프레임 정렬하기 인덱스, 컬럼값으로 정렬할 수 있음. Index, Column 기준으로 정렬하기 axis = 0 : 행 인덱스 기준 정렬(Default 오름차순) ascending = False : 오름차순 / Tru : 내림차순 import numpy as np import pandas as pd print("DataFrame: ") df = pd.DataFrame({ 'col1' : [2, 1, 9, 8, 7, 4], 'col2' : ['A', 'A', 'B', np.nan, 'D', 'C'], 'col3': [0, 1, 9, 4, 2, 3], }) print(df, "\n") # ..