Session Ready
Exercise

Restaurants in Paris

Throughout the exercises in this course, we will work with several datasets about the city of Paris.

In this exercise, we will start with exploring a dataset about the restaurants in the center of Paris (compiled from a Paris Data open dataset). The data contains the coordinates of the point locations of the restaurants and a description of the type of restaurant.

We expect that you are familiar with the basics of the pandas library to work with tabular data (DataFrame objects) in Python. Here, we will use pandas to read the provided csv file, and then use matplotlib to make a visualization of the points. With matplotlib, we first create a figure and axes object with fig, ax = plt.subplots(), and then use this axes object ax to create the plot.

Instructions
100 XP
  • Import pandas as pd and matplotlib.pyplot as plt.
  • Read the restaurants dataset ("paris_restaurants.csv") and assign it to a variable called restaurants.
  • Inspect the first 5 rows of the df dataframe with the head() method. Do you see the columns with coordinates?
  • Make a quick visualization of the locations of the districts using the matplotlib plot() method.