Last active
August 22, 2022 14:03
-
-
Save brucewlee/295c82dc7d02cd2f16dbc7d308b62622 to your computer and use it in GitHub Desktop.
from csv to Pandas to Newline Delimited JSON
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 참조 https://sooeun67.github.io/data%20science/convert-pandas-to-ndjson/ | |
df = pd.read_csv(f'{target_file}.csv') | |
df.to_json(f'{target_file}.json', orient="records", lines=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment