Practice Exercise #4 – Using Panda and Python to process datasets

Assignment Summary

Python programs are a great way to take in external data sources and display their data. In this case, we will use the Pandas data processing library a) both import an external dataset and 2) display its contents. Next week’s training exercise will show you how to manipulate your dataset using Pandas.

Video

Today’s assignment

Task: Using Pandas and a .csv dataset URL, print a dataframe inside your python console.

  1. For this assignment you will use repl.it instead of trinket. Create a repl.it pyhon3 project. Here is a quick breakdown of how to create a repl.it account (and share your work). Sign up for a repl.it account here.
  2. Start with the template below (hint: review the comments). Fill in the following:
    1. Go to Ontario Open Data portal and choose one .csv dataset URL
    2. Print the column names (headers) of your database
    3. Then, print the first 3 rows of your database
  3. Share the repl.it URL when you submit your assignment. Consult the above video if you want to see the sharing steps.

Template

Resources

Skip to toolbar