python - Pandas won't load first of the columns in a CSV file -
i started working through book doing data science , i'm doing first exercise in python. provide data here: data book
i this:
ny = pd.dataframe.from_csv('/path/nyt1.csv', sep=',') i 4 columns, first missing , there should 5! if open file in libreoffice, 5 columns.
i tried changing parameters bit, can't figure out what's going on.
data looks this:
"age","gender","impressions","clicks","signed_in" 36,0,3,0,1 73,1,3,0,1 30,0,3,0,1
just use read_csv:
ny = pd.read_csv('nyt.csv') >>> ny.head() age gender impressions clicks signed_in 0 36 0 3 0 1 1 73 1 3 0 1 2 30 0 3 0 1 3 49 1 3 0 1 4 47 1 11 0 1
Comments
Post a Comment