0

I am reading a file csv with 900 rows and 600 columns with one of this methods:

  1. df = pd.read_csv('filename',engine='python')
  2. f = open(r'filename','r')

and everything is fine.

I am trying to read a file with the same path, the same folder, with half a million rows and 7 columns ,but I am getting an error:

[Errno 22] Invalid argument: 'filename.csv'

I don't know why, and I can't believe that python can't read a file with a half of millions rows.

Please help me understand why and finding a solution

Sander van den Oord
  • 10,986
  • 5
  • 51
  • 96
Asaf
  • 37
  • 4
  • That has nothing to do with the size. File size doesn't affect `open`. You're blaming the wrong thing. – user2357112 Mar 25 '21 at 12:26
  • It's likely not a valid filepath that you are using. Try giving the absolute (entire) path to the file – Alex Mar 25 '21 at 12:27

0 Answers0