metadata
license: openrail
Use it like this.
from datasets import load_dataset, Dataset, DatasetDict
import pandas as pd
data_files = {"train": "multilingual_nli_train_df.csv",
"validation": "multilingual_nli_validation_df.csv",
"test": "multilingual_nli_test_df.csv"}
dataset = load_dataset("muhammadravi251001/multilingual-nli-dataset", data_files=data_files)
selected_columns = ["premise", "hypothesis", "label"]
# selected_columns = dataset.column_names['train'] # Uncomment this line to retrieve all of the columns
df_train = pd.DataFrame(dataset["train"])
df_train = df_train[selected_columns]
df_val = pd.DataFrame(dataset["validation"])
df_val = df_val[selected_columns]
df_test = pd.DataFrame(dataset["test"])
df_test = df_test[selected_columns]
train_dataset = Dataset.from_dict(df_train)
validation_dataset = Dataset.from_dict(df_val)
test_dataset = Dataset.from_dict(df_test)
dataset = DatasetDict({"train": train_dataset, "validation": validation_dataset, "test": test_dataset})
df_multilingual_train = pd.DataFrame(dataset['train'])
df_multilingual_validation = pd.DataFrame(dataset['validation'])
df_multilingual_test = pd.DataFrame(dataset['test'])