I read data into a Pandas dataset, which I split into 3 via a utility function I wrote.
I want to extract a column (name of Close) from the dataset and convert it into a Tensor.
path = os.path.join(self.config.data_dir, self.config.company_file)
data = pd.read_csv(path)
train_data, val_data, test_data = utilz.split_into_train_val_test(data, 0.7, 0.15, 0.15)
train_data = T.tensor(train_data["Close"])
When I run the code I get a “Exception has occurred: KeyError 1”
The column with the name “Close” does exist.
How do I fix this?