Home>

A beginner who has started studying Python recently.
We are reading and writing CSV files and XLSX files.
In the process, FilenotFoundError appeared when you entered the following code.
CSV files are files that are self-made to practice, so they exist.

Import CSV
"Book1.csv") As file:
    Rows= CSV.Reader (File)
    for Row in Rows:
        Print (Row)

This has come out with FilenotfoundError.
Please teach me.

FilenotfoundError will appear even though the file exists

user398892021-07-21 11:01:06

Where is Python running directories? IMPORT OS; OS.GetCWD ()

Hajime2021-07-21 11:01:06
  • Answer # 1

    I think that you should put a CSV file in the same folder as the folder storing code.

  • Answer # 2

    I think that you should put a CSV file in the same folder as the folder storing code.