I am simply trying to define a path and file name then use pandas.read_csv()
in the variable display of spyder, the path and file name appear correct, but in reality they have double \\. I know this has got to be something really stupid...
siteinfopath=r'C:\Users\cpsei\Documents'
siteinfofile=siteinfopath+'\grav_stats.csv'
grav_stats=pd.read_csv(siteinfofile)
When i run the script I get the following error message:
FileNotFoundError: [Errno 2] File b'C:\Users\cpsei\Documents\grav_stats.csv' does not exist: b'C:\Users\cpsei\Documents\grav_stats.csv'
and when I type
siteinfofile
Out[145]: 'C:\\Users\\cpsei\\Documents\\grav_stats.csv'
Why the double \. In the variable viewer the path is correct.