[python] list slicing
2022. 9. 5. 13:48ㆍ파이썬
[python] list slicing
col_list = test_df.columns.tolist()
col_list[-1:]
# 마지막 원소
col_list[:-1]
# 처음~ 마지막원소 전까지
'파이썬' 카테고리의 다른 글
[Python] If using all scalar values, you must pass an index (1) | 2022.09.20 |
---|---|
[Python] conda 가상환경 관리 (0) | 2022.09.18 |
[Python] 현재 작업 경로 디렉토리 얻기 (0) | 2022.09.01 |
[Python] 시간 같은 두 자리 숫자 2자리로 고정시키기 (0) | 2022.08.30 |
[Python] 데이터 프레임에 빈 행 앞(뒤)에 추가 (0) | 2022.08.21 |