Is it possible to see the read data of a pytorchtext.data.Tabulardataset?
train, test = data.TabularDataset.splits(path="./data/", train="train.csv",test="test.csv",format="csv",fields=[("Tweet",TEXT), ("Affect Dimension",LABEL)])


I have this code and want to evaluate, if the loaded data is correct or if it's using wrong columns for the actual text fields etc.

If my file has the columns "Tweet" for the Texts and "Affect Dimension" for the Class name, is it correct to put them like this is the fields section?

Edit: TabularDataset includes an Example object, in which the data can be read. When reading csv files, only a "," is accepted as a delimiter. Everything else will result in corrupted data.

You can put any field name irrespective of what your file has. Also, I recommend NOT TO use white-spaces in the field names.

So, rename Affect Dimension to Affect_Dimension or anything convenient for you.

Then you can iterate over different fields like below to check the read data.

for i in train.Tweet:
    print i
for i in train.Affect_Dimension:
    print i

for i in test.Tweet:
    print i
for i in test.Affect_Dimension:
    print i

