Skip to content

Instantly share code, notes, and snippets.

@Hugoch
Created October 17, 2015 13:15
Show Gist options
  • Save Hugoch/af3e7483d436fac8d48c to your computer and use it in GitHub Desktop.
Save Hugoch/af3e7483d436fac8d48c to your computer and use it in GitHub Desktop.
Read CSV with pandas
import pandas as pd
# define the expected CSV columns
CSV_COLS = ('airline', 'dep_lat', 'dep_lon', 'arr_lat',
'arr_lon', 'nb_flights', 'route')
routes = pd.read_csv(in_filename, names=CSV_COLS, na_values=['\\N'],
sep=';', skiprows=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment