Guided Notes
Extract: CSV Files
Reading CSVs with pandas, handling mixed data types, skipping metadata rows, and a first look at data quality.
Reading a CSV with pandas
Slide 1 / 5CSV (comma-separated values) is the most common data exchange format. pandas reads one into a DataFrame in a single line:
import pandas as pd df_projects = pd.read_csv('projects_data.csv')
Then take a first look:
df_projects.head() β the first five rows df_projects.shape β (rows, columns) df_projects.columns β the column names
