250x250
Link
๋์ GitHub Contribution ๊ทธ๋ํ
Loading data ...
Notice
Recent Posts
Recent Comments
| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 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 | 31 |
Tags
- ํ์ด์ฌ
- Python
- opencv
- ๋ฐ์ดํฐ๋ถ๊ท ํ
- ๋ ๋ฆฝํ๋ณธ
- ADsP
- ์ฃผ์ฑ๋ถ๋ถ์
- Lambda
- t-test
- ๋์ํ๋ณธ
- ADP
- ๋ฐ์ดํฐ๋ถ์์ ๋ฌธ๊ฐ
- ์๋ํด๋ผ์ฐ๋
- datascience
- PCA
- DBSCAN
- ํ ์คํธ๋ถ์
- ์ค๋ฒ์ํ๋ง
- iloc
- ๋น ๋ฐ์ดํฐ
- pandas
- dataframe
- ํฌ๋กค๋ง
- ๊ตฐ์งํ
- ๋ฐ์ดํฐ๋ถ์
- numpy
- LDA
- ๋ฐ์ดํฐ๋ถ์์ค์ ๋ฌธ๊ฐ
- ๋น ๋ฐ์ดํฐ๋ถ์๊ธฐ์ฌ
- ์ธ๋์ํ๋ง
Archives
Data Science LAB
[Python] Json ํ์ผ ์ฝ๊ธฐ/์์ /์ฐ๊ธฐ ๋ณธ๋ฌธ
728x90
1. Json ํ์ผ ์ฝ๊ธฐ
import json
with open('ํ์ผ ๊ฒฝ๋ก','r') as f:
data = json.load(f)
2. Json ํ์ผ ์์
with open('ํ์ผ ๊ฒฝ๋ก', 'w') as make_file:
json.dump(data,make_file)
3. Json ํ์ผ ์ฐ๊ธฐ
with open('์ ์ฅ๊ฒฝ๋ก','w', encoding='utf-8) as make_file:
json.dump([๋์
๋๋ฆฌ ์ด๋ฆ] , make_file, indent='\t')
๋จผ์ , ํ์ด์ฌ ์ธ์ด๋ฅผ ์ฌ์ฉํ์ฌ ๋์ ๋๋ฆฌ๋ฅผ ์์ฑํ ํ , json ํ์์ ํ์ผ๋ก ์ ์ฅํ ์ ์๋ค.

728x90
'๐ Python > ๊ธฐ์ด' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| [Python] ํ์๋๋ ํ ๋ฆฌ ๊ฒ์ (0) | 2022.05.03 |
|---|---|
| [Python] ๋ช ๋ นํ ์ธ์๋ฐ๊ธฐ(sys.argv) (0) | 2022.04.27 |
| [Python]qrcode ๋ชจ๋์ ์ด์ฉํ ๋ธ๋ก๊ทธ qr ์ฝ๋ ์์ฑ (0) | 2022.04.25 |
| ํด๋ ์์ ํ์ผ ํ๋ฒ์ ๋ถ๋ฌ์ค๊ธฐ (0) | 2022.04.13 |
| [Python] ๋ ์ง(Datetime) ๋ค๋ฃจ๊ธฐ (0) | 2022.03.22 |
Comments