i'm having difficulty reading csv file pandas data frame. total newcomer pandas, , preventing me progressing. have read documentation , searched solutions, unable proceed. have tried following no avail...
import pandas pd import numpy np pd.read_csv('c:\users\rcreedon\desktop\test.csv') pd.read_csv("c:\users\rcreedon\desktop\test.csv")
and similar permutations with/without quotation marks.
it spits out large composite error ends in:
ioerror: file c:\users creedon\desktop\test.csv not exist
it seems strange in error misses of "r" "rcreedon". what's causing problem?
just sake of tried
pd.read_csv('c:\rcreedon\desktop\test.csv')
and again 'r' missed when error returned.
sorry such block head, i'm struggling here....
any appreciated.
"\r" interpreted special character , means carriage return. either add 'r' prefix string literals prevents special sequence being interpreted (e.g. path = r"foo\rar"
), or, suggested, use normal slash path delimiter. python intelligent enough work on windows :-)
Comments
Post a Comment