562 attributed reviews in the last 3 years
Refreshingly small course sizes
Outstandingly good courseware
Whizzy online classrooms
Wise Owls only (no freelancers)
Almost no cancellations
We have genuine integrity
We invoice after training
Review 30+ years of Wise Owl
View our top 100 clients
This exercise is provided to allow potential course delegates to choose the correct Wise Owl Microsoft training course, and may not be reproduced in whole or in part in any format without the prior written consent of Wise Owl.
This is quite a long exercise, but Wise Owl will hold your hand (wing?) for each step. The aim is just to give you an idea of what you can do wtih Pandas dataframes.
The workbook in the above folder contains a list from Wikipedia of the 30 most viewed videos on YouTube of all time (at the time of writing):
Start by creating a Python program called Brave new world.py which loads the data from this workbook into a Pandas dataframe. Here is the start of the command to prompt you:
import pandas as pd
# read the Excel workbook into a Pandas dataframe
videos = pd.read_excel(
Use the head function to show the top 5 rows only from the dataframe:
The first 5 rows.
Now set another variable called top_five to hold just the first 5 videos from the dataframe, but this time using slicing to get them. Now show a single series from this second dataframe giving the video names only, by picking out the item from the dictionary of columns using this syntax:
# show just the video names of the top 5
This should give you this series:
The names of the first 5 videos.
Now set a third variable called sorted_videos to hold the videos sorted by publication date, with the most recently published coming first. Here is the syntax of how to do this:
# sort a dataframe by one or more columns
new_dataframe = original_dataframe.sort_values(
ascending=[True or False]
Use iloc to print out just the last 2 columns of this sorted dataframe, using this syntax:
print(sorted_videos.iloc[slicing for rows,slicing for columns])
You should now see something like this:
We're showing all of the rows, but only the last two columns.
Phew! Save your program and close it down, and watch Baby Shark for a bit of light relief.
25 Aytoun Street