두 개가 무슨 차이인지 모름!
# 판매량 데이터
import json
# method 1
with open('./data/etc/sample/data.json') as json_file:
json_data = json.load(json_file)
df = pd.DataFrame(json_data).drop(columns='index_col')
# method 2
with open('./data/etc/data.json') as json_file:
json_data = json.load(json_file)
df = pd.DataFrame(list(json_data.values())[0])
'언어 꿀Tip > Python 꿀tip!' 카테고리의 다른 글
07_01_49. timeseries 그래프에 linear regression trend line 추가 (0) | 2021.06.17 |
---|---|
07_01_48. DB2 연결하여 SQL로 데이터 산출 (0) | 2021.06.14 |
07_01_46. 2x2 형태로 여러 line 중첩해서 그래프 그리기 (0) | 2021.06.08 |
07_01_45. groupby 컬럼명 level 합치기 (0) | 2021.06.04 |
07_01_44. seaborn multiple line chart 여러개 동시에 그래프그리기 (0) | 2021.06.03 |