반응형 전체 글417 엑셀 시트 pandas로 불러오기 프롬프트 2025. 6. 25. json 파일 - csv 파일로 전환 json 파일 - csv 파일로 전환 import jsonimport pandas as pd# JSON 파일 불러오기 file_path = "data/seoul-service-price.json"#pd.read_json(file_path)import jsonfile_path = "data/seoul-service-price.json"with open(file_path, "r", encoding="utf-8") as f: data = json.load(f) json_data # JASON 데이커 읽기 with open(file_path, "r", encoding="utf-8") as f: data = json.load(f) json_data["DESCRIPTION"] {'INDUTY.. 2025. 6. 25. chatGPT 코딩 에러시 수정 프롬프트 예시 ValueError: Mixing dicts with non-Series may lead to ambiguous ordering.위와 같은 오류 메시지가 다음 코드에서 발생했습니다. 오류를 수정해 주세요import jsonimport pandas as pd# JSON 파일 불러오기file_path = "data/seoul-service-price.json"pd.read_json(file_path) 2025. 6. 25. Python html 파일 불러와서 csv파일로 저장하기 import pandas as pdurl = "https://ko.wikipedia.org/wiki/%EC%84%9C%EC%9A%B8%ED%8A%B9%EB%B3%84%EC%8B%9C%EC%9D%98_%ED%96%89%EC%A0%95_%EA%B5%AC%EC%97%AD"# df_htmltable = pd.read_html(url)len(table)table[0]table[1]df_html = table[1]df_html.shapedf_html.head()df_html.tail()file_path = "data/seoul-gu.csv"df_html.to_csv(file_path) pd.read_csv(file_path)file_path = "data/seoul-gu.csv"df_html.to_csv(file_.. 2025. 6. 25. 이전 1 2 3 4 ··· 105 다음 반응형