[python] reset_index( )
·
python
reset_index() 1. 새로운 인덱스를 연속 숫자 형으로 할당 - 노랑 2. 기존 인덱스는 index 라는 새로운 칼럼명으로 추가됨 -파랑 titanic_df.reset_index() drop = True 로 설정하면 기존 인덱스는 새로운 칼럼으로 추가되지 않고 삭제 된다. titanic_df.reset_index(drop=True)