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
- 5397
- 문제풀이
- ncp배포
- 다리 놓기
- json
- 16953
- python
- 9735번
- 1010번: 다리 놓기 (Python)
- Charfield
- 백준 7576
- 백준 1158번
- ncloud서버
- epsp
- NaverCloudPlatform
- 경상국립대학교
- Django
- linc3.0
- max_length
- 백준
- lgh
- PS
- 요세푸스 문제
- 고속거듭제곱알고리즘
- 그래프 탐색
- 백준 토마토
- 7576번
- 백준 1158
- 백준 다리놓기
- 백준 7576번
Archives
- Today
- Total
목록json (2)
DolphinDash

import json import os with open(f'열 JSON파일', 'r', encoding='UTF8') as rf: json_data = json.load(rf) data = json_data['data'] atributes = data[0]['attributes'] print(atributes) keywords = [] for j in range(len(atributes)): keywords.append(atributes[j]['name']) keyword = ' '.join(keywords) os.rename('원래 파일 경로', '이름 바꾼 파일 경로')
개발Log
2023. 8. 3. 17:10

import json with open(f'json파일위치', 'r', encoding='UTF8') as rf: json_data = json.load(rf) #데이터 수정 예시 data = json_data['data'] video_name = json_data['metaData']["name"] # print(json_data) new_data_set = {} new_data_set['videoName'] = video_name new_data_set['data'] = data with open(f'json파일위치', 'w', encoding='UTF8') as wf: json.dump(new_data_set, wf, indent="\t", ensure_ascii=False) ensure_ascii..
개발Log
2023. 8. 3. 16:56