'Timestamps against particulate matter Timeseries ARIMA

I have a dataset with 8 different features, with timestamps included among these features. The timestamps are in this format 2014-08-01 00:05:00 (i.e 5minutes interval frequency from August 1st, 2014 to October 1st, 2014). The timestamps start from 2014-08-01 00:05:00 and ends 2014-10-01 00:00:00. I plotted Timestamps against Particulate Matter by using the timestamps column as an index so the timestamps are on the x-axis on the plot. Next, I want to split them into test and train datasets so I can create an ARIMA-based time series model with the train data frame. I try using numpy array method to arrange them x = np.array(df['particullate_matter']).reshape(-1,1) y = np.array(df['timestamp'])

but I keep getting a Key-error for the timestamp. Please I will appreciate it if any can help with this thanks in advance. The top five rows of the dataset are below.

               ozone pm co  so2 no2 longitude   latitude

timestamp
2014-08-01 00:05:00 41 58 98 63 40 10.261365 56.242033 2014-08-01 00:10:00 38 56 98 68 42 10.261365 56.242033 2014-08-01 00:15:00 40 51 100 73 37 10.261365 56.242033 2014-08-01 00:20:00 41 51 97 71 37 10.261365 56.242033 2014-08-01 00:25:00 37 48 96 76 37 10.261365 56.242033



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source