janboone/applied-economics

> # Question regarding saving in subdirectory

Closed this issue · 1 comments

Running the code

df_wb.to_csv('applied-economics/data/worldbank_data_gdp_per_capita.csv')
or
output_file('data/inequality.html')

gives an error: [Errno 2] No such file or directory

Do I have to take a step before this? Or do I first have to create a subdirectory?

Indeed, you first need to create the directory/folder data. On jupyterlab, when you can see your files, click on the folder icon with a "+" inside it.

If this does not work (I will show tomorrow how to do this), you can run the code with the current directory:

df_wb.to_csv('worldbank_data_gdp_per_capita.csv') 

output_file('inequality.html')

It eventually worked with using the folder with a "+" in it, thanks!