반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Flux
- Jenkins
- codebuild
- node
- JavaScript
- java bigdecimal
- or some instances in your deployment group are experiencing problems.
- COALESCE
- aws cicd
- Kafka
- kubeflow
- AWS CI/CD 구축하기
- chartjs
- PostgreSQL
- docker
- codedeploy
- Spring
- Airflow
- redis
- IntelliJ
- Python
- SQL
- bootstrap
- chart.js
- codedeploy error
- VPN
- 도커
- codepipeline
- Spring Error
- aws
Archives
- Today
- Total
Small Asteroid Blog
[python] dataframe 컬럼명 변경하기 본문
728x90
python 에서 csv 를 사용하는데 컬럼명을 변경해서 사용하고자 한다.
한번에 다 변경
df.columns = ["id","name","addr"]
df
특정 컬럼의 컬럼명만 변경 - id 를 ids 로, name 을 rename 으로 변경한다
df.rename(columns={"id":"ids","name":"rename"},inplace = True)
df
728x90
반응형
'백엔드 > Python' 카테고리의 다른 글
[python] dataframe 숫자만 추출, 숫자+문자 추출 (데이터 전처리) (0) | 2022.01.26 |
---|---|
[python] 'in <string>' requires string as left operand, not float (0) | 2022.01.26 |
Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager (0) | 2022.01.07 |
pip install *.whl is not a supported wheel on this platform (0) | 2022.01.07 |
파이썬 설치 경로 찾기 (0) | 2022.01.06 |