How to read file with space separated values in pandas Ask Question

How to read file with space separated values in pandas Ask Question

I try to read the file into pandas. The file has values separated by space, but with different number of spaces I tried:

pd.read_csv('file.csv', delimiter=' ')

but it doesn't work

ベストアンサー1

add delim_whitespace=True argument, it's faster than regex.

おすすめ記事