'Index'에 해당되는 글 3건
- 2022.09.06 :: [python] dataframe에서 컬럼 범위로 가져오기
- 2022.05.30 :: [python] dataframe column index 가져오기
- 2022.03.17 :: dataframe pivot table 후에 index name 지우기
카테고리 없음
2022. 9. 6. 19:07
df.columns[df.columns.get_loc('컬럼1'):df.columns.get_loc('컬럼2')+1]
컬럼이 많아지면 컬럼 index를 찾아서 가져오기가 힘든 경우가 많다. 그래서 컬럼명으로 찾아서 해당 구간 내에 있는 컬럼들을 다 가져오면 편하다.
Python
2022. 5. 30. 11:38
dataframe column의 index를 가져오는 코드
import pandas as pd
df = pd.read_csv("")
df.columns.get_loc("columns_name")'Python' 카테고리의 다른 글
| Isolation Forest와 One-Class SVM (0) | 2022.06.03 |
|---|---|
| [python] sklearn RandomizedSearchCV (0) | 2022.05.30 |
| [Python]이미지 파일 불러와서 일자별로 폴더 생성 후 복사 (0) | 2022.05.29 |
| dataframe groupby agg percentile (0) | 2022.05.02 |
| decimal. 부동소수점 계산을 위한 라이브러리 (0) | 2022.03.30 |
Python
2022. 3. 17. 12:44
pivot_table.reset_index().rename_axis(None, axis=1)'Python' 카테고리의 다른 글
| dataframe groupby agg percentile (0) | 2022.05.02 |
|---|---|
| decimal. 부동소수점 계산을 위한 라이브러리 (0) | 2022.03.30 |
| jupyter에서 warning 메시지 제거 (0) | 2022.01.10 |
| 기간별 주차 만들기 (0) | 2021.12.07 |
| dataframe isin 함수 (0) | 2021.06.24 |
