license:openrail region:us
---
license: openrail
---

You can download this Dataset just like this (if you only need: premise, hypothesis, and label column):

```
from datasets import load_dataset, Dataset, DatasetDict
import pandas as pd

data_files = {"train": "data_nli_train_df_debug.csv", 
              "validation": "data_nli_val_df_debug.csv", 
              "test": "data_nli_test_df_debug.csv"}

dataset = load_dataset("muhammadravi251001/debug-entailment", 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})
```

If you want to download keep-invalid-data-dataset:
```
from datasets import load_dataset, Dataset, DatasetDict
import pandas as pd

data_files = {"train": "data_nli_train_df_keep.csv", 
              "validation": "data_nli_val_df_keep.csv", 
              "test": "data_nli_test_df_keep.csv"}

dataset = load_dataset("muhammadravi251001/debug-entailment", 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})
```

If you want to download drop-invalid-data-dataset:
```
from datasets import load_dataset, Dataset, DatasetDict
import pandas as pd

data_files = {"train": "data_nli_train_df_drop.csv", 
              "validation": "data_nli_val_df_drop.csv", 
              "test": "data_nli_test_df_drop.csv"}

dataset = load_dataset("muhammadravi251001/debug-entailment", 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})
```