I saw that the dataset has a method, cast_(), which accepts a nlp.Features object. However, when I try to do this:
features = nlp.Features({
    "id_str": nlp.Value("string"),
    "TWEET": nlp.Value("string"),
    "LABEL": nlp.ClassLabel(names=["AGAINST", "FAVOR", "NEUTRAL"]),
})

train_dataset = nlp.load_dataset(
    "csv",
    delimiter="\t",
    data_files="spanish_train.csv",
    split="train",
)

train_dataset.cast_(features)

It gives me the following error:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-38-d718935de6f0> in <module>()
     12 )
     13 
---> 14 train_dataset.cast_(features)

1 frames
/usr/local/lib/python3.6/dist-packages/nlp/arrow_dataset.py in cast_(self, features)
    393         self._info.features = features
    394         schema = pa.schema(features.type)
--> 395         self._data = self._data.cast(schema)
    396 
    397     def remove_column_(self, column_name: str):

/usr/local/lib/python3.6/dist-packages/pyarrow/table.pxi in pyarrow.lib.Table.cast()

ValueError: Target schema's field names are not matching the table's field names: ['id_str', 'TWEET', 'LABEL'], ['LABEL', 'TWEET', 'id_str']

But when I switch the order in the nlp.Features dict it gives this error:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-40-9b8397e5244e> in <module>()
     12 )
     13 
---> 14 train_dataset.cast_(features)

/usr/local/lib/python3.6/dist-packages/nlp/arrow_dataset.py in cast_(self, features)
    387         if list(features) != self._data.column_names:
    388             raise ValueError(
--> 389                 f"The columns in features ({list(features)}) must be identical and in the same order "
    390                 f"as the columns in the dataset: {self._data.column_names}"
    391             )

ValueError: The columns in features (['LABEL', 'TWEET', 'id_str']) must be identical and in the same order as the columns in the dataset: ['id_str', 'TWEET', 'LABEL']

So, for some reason, my auto-configured features are in inverse order, but the dataset has the correct one. I can check this because if I print the train_dataset object, it gives me this:
Dataset(features: {'id_str': Value(dtype='float64', id=None), 'TWEET': Value(dtype='string', id=None), 'LABEL': Value(dtype='string', id=None)}, num_rows: 6046)

And when I print train_dataset.features, I get this:
{'LABEL': Value(dtype='string', id=None),
 'TWEET': Value(dtype='string', id=None),
 'id_str': Value(dtype='float64', id=None)}

I don’t know how to proceed after this. Can anyone explain how can I configure my datasets’ features properly, please?