Extracting features from date and time
In Chapter 6, Extracting Features from Date and Time, we created various features from the date and time parts of datetime variables using pandas and Feature-engine. We can also extract multiple features from datetime variables, automatically utilizing Featuretools.
Featuretools supports the creation of various features from datetime variables using its datetime transform primitives. These primitives include the creation of features such as year, month, and day, and also other features such as is it lunch time or is it weekday?
Note
For more details on the features that can be created using datetime variables, visit https://featuretools.alteryx.com/en/stable/api_reference.html#datetime-transform-primitives.
In this recipe, we will automatically create multiple features from a datetime variable with Featuretools.
How to do it...
Let’s begin by importing the libraries and getting the dataset ready:
- First, we’...