Session Ready
Exercise

EDA plots II

Another idea that comes to mind is that the price of a ride could change during the day.

Your goal is to plot the median fare amount for each hour of the day as a simple line plot. The hour feature is calculated for you. Don't worry if you do not know how to work with the date features. We will explore them in the chapter on Feature Engineering.

Instructions
100 XP
  • Group train DataFrame by "hour" and calculate the median for the "fare_amount" column.
  • Using hour_price DataFrame obtained, plot a line with "hour" on the x axis and "fare_amount" on the y axis.