DataFrame selection and slicing was thoroughly covered in Chapter 4, Selecting Subsets of Data. When the DataFrame posses a DatetimeIndex, even more opportunities arise for selection and slicing.
Slicing time series intelligently
Getting ready
In this recipe, we will use partial date matching to select and slice a DataFrame with a DatetimeIndex.
How to do it...
- Read in the Denver crimes dataset from the hdf5 file crimes.h5, and output the column data types and the first few rows. The hdf5 file format allows efficient storage of large scientific data and is completely...