Reading a csv file
Before you analyze data, you will need to read the data into a pandas DataFrame. In this exercise, you will be looking at data from US School Improvement Grants in 2010. This program gave nearly $4B to schools to help them renovate or improve their programs.
This first step in most data analysis is to import pandas and seaborn
and read a data file in order to analyze it further.
This course introduces a lot of new concepts, so if you ever need a quick refresher, download the Seaborn Cheat Sheet and keep it handy!
Diese Übung ist Teil des Kurses
Intermediate Data Visualization with Seaborn
Anleitung zur Übung
- Import
pandasandseabornusing the standard naming conventions. - The path to the csv file is stored in the
grant_filevariable. - Use
pandasto read the file. - Store the resulting DataFrame in the variable
df.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# import all modules
import pandas as ____
import seaborn as ____
import matplotlib.pyplot as plt
# Read in the DataFrame
df = pd.____(grant_file)