from datasets import Dataset import pandas as pd df = pd.DataFrame({"a": [1, 2, 3]}) dataset = Dataset.from_pandas(df)