Why take the index column and not the date time column?

I​ don’t understand why the code store the first column of the csv file as the time step and not the column 1 with all the date times.

for row in reader:



A​rent we losing information here?

We use the sunspots data and we change our dates into sequential numbers. The dates are sequential as well, so we don’t lose too much. Btw, why row[2]?

Hi @ maurizioscibilia,
Thank you for your reply. But there is something I’m missing. The sunspots data in kaggle is a three columns table (if we import it as a dataframe) the first column are integers from 0 to 3624 the second are dates (one per month from 1749-01-31 to 2021-01-31) and the last column is for the values.
So when we’re storing the data, I thought that we would take the column of dates and use datetime to change the format and clean it if necessary. So when we predict we ask for example for sunspots of 2022-01-31. Am I making sense? Here if we want to predict 3 months from now what should we give the forecasting function?

I guess this dataset is a different one. The dates are from the '81 to the '90.

For this week’s exercise, you’ll use a dataset from Jason Brownlee, author of the amazing MachineLearningMastery.com site and who has shared lots of datasets at GitHub - jbrownlee/Datasets: Machine learning datasets used in tutorials on MachineLearningMastery.com. It’s a dataset of daily minimum temperatures in the city of Melbourne, Australia measured from 1981 to 1990.

Regarding the prediction based on the date, I think it was out of the assignment’ scope . You can still do it for fun though.

Hope it helps