stanfordnlp / dspy

DSPy: The framework for programming—not prompting—foundation models
https://dspy-docs.vercel.app/
MIT License
13.82k stars 1.06k forks source link

Enhancement: Would be great if we can load dspy dataset directly from pandas dataframe #1177

Closed Anindyadeep closed 4 days ago

Anindyadeep commented 1 week ago

This would be useful for certain scenarios, where we might not be interested to save the csv (personally this was the case for me) instead directly load from some dataframe.

Here is an example:

dataloader = DataLoader()
train_dataset = dataloader.from_pandas(df=df_train, fields=["question", "query"])
Anindyadeep commented 4 days ago

Closing this issue, since PR merged :D