Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (17.6k points)

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 Answer

0 votes
by (41.4k points)

Add this:

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

If you want to learn more about Pandas then visit this Python Course designed by the industrial experts.

Browse Categories

...