Jupyter Notebooks
Plan: install and run Jupyter notebooks so I can learn how to setup a python workflow for managing reports or processing common datasets for different customers.
An example: Reporting on who has what Office 365 license and email address from a user export file.
Desired result: Export user list, manipulate to extract specific fields and generate an Excel document the customer can understand.
First I installed Miniconda https://docs.conda.io/en/latest/miniconda.html
Then I installed Jupyter https://jupyter.org/install
conda install -c conda-forge jupyterlab
Following along with this tutorial. https://www.dataquest.io/blog/jupyter-notebook-tutorial/
I had to launch the Miniconda command prompt and then change to the directory I wanted the notebook to live in before launching.
(base) C:\Users\johna>cd OneDrive\Documents\GitHub\Jupyter
(base) C:\Users\johna\OneDrive\Documents\GitHub\Jupyter>jupyter notebook
Then the Jupyter file tree opened up. I created a new notebook and now it’s time to experiment.
I modified my Jupyter config to make it start in the right folder so I don’t have to change to that directory every time. Used these instructions: https://stackoverflow.com/questions/35254852/how-to-change-the-jupyter-start-up-folder
Open cmd (or Anaconda Prompt) and run jupyter notebook --generate-config.
This writes a file to C:\Users\username\.jupyter\jupyter_notebook_config.py.
Browse to the file location and open it in an Editor
Search for the following line in the file: #c.NotebookApp.notebook_dir = ''
Replace by c.NotebookApp.notebook_dir = '/the/path/to/home/folder/'
Make sure you use forward slashes in your path and use /home/user/ instead of ~/ for your home directory, backslashes could be used if placed in double quotes even if folder name contains spaces as such : "D:\yourUserName\Any Folder\More Folders\"
Remove the # at the beginning of the line to allow the line to execute
To Be Continued…