In this section, we show you how to handle time series data. We will start by showing how to create time series data using the data read in from a
Here, we demonstrate the various ways to read in time series data:
In : ibmData=pd.read_csv('ibm-common-stock-closing-prices-1959_1960.csv') ibmData.head() Out: TradeDate closingPrice 0 1959-06-29 445 1 1959-06-30 448 2 1959-07-01 450 3 1959-07-02 447 4 1959-07-06 451 5 rows 2 columns
The source of this information can be found at http://datamarket.com.
We would like the
TradeDate column to be a series of
datetime values so that we can index it and create a time series. Let us first check the type of values in the
TradeDate series: ...