Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

jupyter notebook set default directory

'Important note:'
	This fix only applies if you are using Anaconda to start Juypter Notebook.
    
'Steps:'
	'1: Open Anaconda Navigator'
  
  	'2: Click the Environments tab on the left side'
    
  '''3: Next to "base (root)" should be a green play button,
        click that followed by "Open Terminal" '''
    
    '4: In the terminal that opens, run these commands:'
		jupyter notebook --generate-config
		notepad %userprofile%.jupyterjupyter_notebook_config.py

	'5: Notepad should open, press CTRL+F and search for this:'
 		c.NotebookApp.notebook_dir
  
  '''6: Un-comment the line, then place the path you want to use inside the quotes'
		NOTE: Replace any back slashes with forward slashes!'
        Example: '''
			c.NotebookApp.notebook_dir = 'C:/Users/cloud/Documents/Jupyter Notebooks'
  
	'7: Save the file and restart Anaconda Navigator, closing Notebook if prompted.'
Comment

how to set default file directory for jupyter notebook

import os
os.getcwd()
Out[2]:
'/tmp'
In [3]:

os.chdir('/')
In [4]:


os.getcwd()
Out[4]:
'/'
In [ ]:
Comment

how to set default file directory for jupyter notebook

%cd "C:abcxyz"
Comment

PREVIOUS NEXT
Code Example
Python :: vector data 
Python :: curly braces in python 
Python :: how to get the time zones in python 
Python :: if or python 
Python :: sparse matrix multiplication in python 
Python :: how to add new column in django 
Python :: django-multivaluedictkeyerror-error 
Python :: immutability in python 
Python :: download gzip file python 
Python :: how to remove some indexes from a dataframe in python 
Python :: run python code online 
Python :: python print text 
Python :: aws s3 sync boto3 
Python :: python logical operators code 
Python :: python print array 
Python :: python list pop equivalent 
Python :: tuplein python 
Python :: sub function python 
Python :: string template python 
Python :: add one element to tuple python 
Python :: ImportError: No module named pandas 
Python :: get column names and and index in Pandas dataframe 
Python :: add user agent selenium python canary 
Python :: download pdf file python 
Python :: dataframe python diplay 2 tables on same line 
Python :: Python - Comment Parse String to List 
Python :: select columns rsnge dataframe 
Python :: if boolean func 
Python :: Add dj_database_url on heroku or production 
Python :: python with statement local variables 
ADD CONTENT
Topic
Content
Source link
Name
1+5 =