CSV 읽기/쓰기, 행/열 선택/삭제, axis


CSV 읽기/쓰기, 행/열 선택/삭제, axis

CSV 읽고 쓰기 읽기 df = pd.read_csv("./dataset.csv") 쓰기 df.to_csv("./dataset.csv", sep=',', float_format='%.f2', index=False) 경고 끄기 pd.set_option('mode.chained_assignment', None) Data Frame 생성 d = {'col1': [1, 2, 3], 'col2': [4, 5, 6]} df = pd.DataFrame(data=d) Data Frame index reset df.reset_index(inplace=True, drop=True) 행 선택/삭제 iloc(integer-location based)로 행 선택 df.iloc[0] # 0 번째 행 선택 (행만 series로) ..


원문링크 : CSV 읽기/쓰기, 행/열 선택/삭제, axis