Reading/writing files from PC directly from the notebook

Hello, I’m doing some webscraping, where i create a .csv file and save it on my PC, and then read it into a dataframe. When i do it from Jupiter -everything works. However in Datalore it reports incorrect path to save the file. Could i modify the path somehow or the only way to work with .csv in Datalore is to attach the file through the menus?

Hi Yuli! You could create file using relative paths, for example

with open("myfile.csv", 'a+') as file:

It will create “myfile.csv” at attached files, ./myfile.csv path also works.

Don’t forget to update the attached files after cell execution in order to see updates.