diff --git a/data_io.py b/data_io.py new file mode 100644 index 0000000..b242c23 --- /dev/null +++ b/data_io.py @@ -0,0 +1,10 @@ +import json +import pandas as pd + + +def jsonl_to_df(file_path: str) -> pd.DataFrame: + data = [] + with open(file_path, 'r', encoding='utf-8') as file: + for line in file: + data.append(json.loads(line)) + return pd.DataFrame(data)