import pandas as pd import json metadata_df = pd.read_csv("metadata.csv") print(metadata_df.head()) json_dict = metadata_df.to_dict(orient='records') with open('metadata.jsonl', 'w') as f: for entry in json_dict: # Convert each dictionary to a JSON string and write to the file f.write(json.dumps(entry) + '\n')