Learn how to generate graph of rides per hour in a day. To do this we’ll extract part of time stamps, use groupby and also pivot the DataFrame. You can use Pandas plotting capabilities to display the result.
- [Narrator] We've seen the hourly rides per day.…Now let's try to view the median…of hourly rides over all days.…First, we'll count the number of rides per hour of day.…Then, we'll calculate the median…for each hour across all days.…Oh, and to make things more interesting,…let's display the results by vendor.…Let's take it one step at a time.…First, we'll create auxiliary columns for day and hour.…So, data frame and hour…is the dataframe pickup time…dot dt dot hour and the dataframe dot day…would be df, again off the pickup time,…dot dt, and this time, dot date.…
Let's take a quick look, and day,…and let's look at the head.…So we have the hour and the date.…Now we group by vendor, day and hour.…So df dot groupby and vendor…and then day and then hour.…This is more interesting, the number of rides,…again we're going to use the count activate,…and let's see just the head.…Again we see the same numbers in all of the columns…since we just count rows.…
Back before, where we picked the vendor column,…as a representative, so let's do that.…
- Working with Jupyter notebooks
- Using code cells
- Extensions to the Python language
- Markdown cells
- Editing notebooks
- NumPy basics
- Broadcasting, array operations, and ufuncs
- Folium and Geo
- Machine learning with scikit-learn
- Plotting with matplotlib and bokeh
- Branching into Numba, Cython, deep learning, and NLP
Skill Level Intermediate
1. Scientific Python Overview
2. The Jupyter Notebook
3. NumPy Basics
Manage environments5m 11s
6. Folium and Geo
7. NY Taxi Data
10. Other Packages
11. Development Process
Next steps1m 33s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.