February 2019
Beginner to intermediate
308 pages
7h 42m
English
As we've seen earlier in the section on data visualization, ridership volume depends heavily on the day of the week, as well as the time of day.
Let's look at the format of the pickup_datetime column by running the following code:
print(df.head()['pickup_datetime'])
We get the following output:

Recall that neural networks require numerical features. Therefore, we can't train our neural network using such a datetime string. Let's separate the pickup_datetime column into different columns for year, month, day, day_of_week, and hour:
df['year'] = df['pickup_datetime'].dt.yeardf['month'] = df['pickup_datetime'].dt.monthdf['day'] ...