Hi @Zim1-finest !
For the code, you only need to have a text
column in your pandas DataFrame that contains exactly your text. Assuming you have a CSV file where each line is a text:
# test.csv
Welcome to Prodigy!
I love playing baseball
My brother went to the library
You can then convert them using this script:
import pandas as pd
# `header` is None because we don't have a CSV header in the example
df = pd.read_csv("test.csv", encoding="ISO-8859-1", header=None)
# Convert to JSONL
jsonl_str = df.to_json(orient="records", lines=True)
# Inspect JSONL string
print(jsonl_str)