I've recently installed Linux Mint 20 on my machine. I wanted to continue with my project, but I keep getting an error:
FileNotFoundError: [Errno 2] No such file or directory: 'data.csv'.
I am trying to read a file, called 'data.csv', that is in the same folder as the python script. I had no issues on Windows 10, but now it keeps giving me this issue. This is my code:
import pandas as pd
df = pd.read_csv("data.csv")
I also tried using "./data.csv" instead, since "." refers to the current directory, but it didn't help me.
Can anyone explain me why and how can I fix this?
It works if I type in the absolute path, but is there away to make it work with the relative path?