In which folder should I add the files to be read by Jupyter Notebook

Asked

Viewed 1,857 times

1

I’m learning to use Jupiter Notebook to study Data Analysis, but I’m encountering a problem using it. In the lesson I am doing, we should read some data provided with the extension .csv. However, when running the program to read the files, I get the message that the modules were not found. I guess I didn’t put the files in the correct directory, so I would like to know which directory should actually be used. I use Pycharm 3.7 and Anaconda3.

[1]

[2]

  • You have to navigate to the folder. Probably the jp notebook that you opened, was opened pointing to a folder above. Look in the top corner of the top corner at the path your file is pointing to. For example if it is opening in the ANALYZE folder its command has to be enrollments = read_csv(/venv library root/share/enrollments.csv). Note: When posting a question in the stack, do not put images of your code but the code itself. It gets bad to give a Ctrl+c+V to fix it if needed.

  • Is the past path correct? I believe you have to navigate to it. Example: read_csv(.. /enrollments.csv)

  • I thought it was something automatic, and that I should not pass the path manually. After your explanation I managed to use. Thank you very much.

  • Marcos, this is the first time I’ve used Stack to ask questions, thanks for the tip!

2 answers

1

Create a file . bat with the startup of the notebook jupyter in the folder where this file is Enrollment.csv

  • In the file folder Enrollment.csv creates a file . txt and write in it jupyter notebook
  • Save the file . txt
  • Change the file extension above to . bat and save
  • Run the file

This sequence of operations will open the notebook jupyter right in the file folder.

0

Andressa, I recommend you to do the following. In the folder where you are using the created notebook, in the address tab of the folder type jupyter notebook. Your system will open a startup window of the Jupyter Notebook process and will open in your main browser the folder in which it is. If you have some knowledge of handling HTML files, you can use a local navigation to reach such files. Example:

inserir a descrição da imagem aqui

If you’re in the arquivo_2_1 and want to access information from arquivo_1_2, will have to make the way '../arquivo_1/arquivo_1_2.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.