I'm trying to get a column count in a 500 csv files.
reading them into python wasn't an issue but the issue rests on how Python read them
from my understanding D:/myfiles/folder/anotherfolder/1folder/2folder
is the correct way to input your filepath.
My script read it in correctly:
import glob
import os
import pandas as pd
mycsvdir = 'filepath'
csvfiles = glob.glob(os.path.join(mycsvdir, '*csv'))
except for one issue
with the code above
I was expecting all my files to be directed like this
D:/myfiles/folder/anotherfolder/1folder/2folder
but now it reads in like this D:/myfiles/folder/anotherfolder\1folder/2folder
I'm trying to a string replacement on this ''
but this method:
csvfiles.replace('\',''/')
is giving me this error:
AttributeError: 'list' object has no attribute 'replace'