빅데이터분석기사 실기

[021] index 번호 정리하기

M1RA 2022. 6. 20. 14:02

1. 여러 개의 DataFrame을 합친 경우, index 번호 RangeIndex로 새롭게 부여

- pd.concat([df1, df2, ...], ignore_index=True)

- DataFrame.index = pd.RangeIndex(len(df))

 

2. 여러 개의 DataFrame을 합친 경우 index 번호를 RangeIndex로 새롭게 부여

- pd.concat([df1, df2, ...], ignore_index=True)

- DataFrame.index = pd.RangeIndex(len(df))

 

<출처>

인프런 - [EduAtoZ] 빅데이터분석기사 실기 대비 Part2. index 번호 정리하기

https://www.inflearn.com/course/%EB%B9%85%EB%8D%B0%EC%9D%B4%ED%84%B0-%EB%B6%84%EC%84%9D%EA%B8%B0%EC%82%AC-%EC%8B%A4%EA%B8%B0-%ED%8C%8C%EC%9D%B4%EC%8D%AC