Assuming that df is initialised as a dataframe, and that I use df:load_csv(filepath) to open the .csv file, before running print(df:shape()) to return its dimensions, is there an obvious way to convert df to a tensor? I tried new_tensor = torch.Tensor(df) but this didn't work.
It would be nice if the best method to do this was in the readme.
Hi,
Assuming that
df
is initialised as a dataframe, and that I usedf:load_csv(filepath)
to open the.csv
file, before runningprint(df:shape())
to return its dimensions, is there an obvious way to convertdf
to a tensor? I triednew_tensor = torch.Tensor(df)
but this didn't work.It would be nice if the best method to do this was in the readme.