Created
October 17, 2015 13:15
-
-
Save Hugoch/af3e7483d436fac8d48c to your computer and use it in GitHub Desktop.
Read CSV with pandas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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