Tag: Jupyter Notebook

Getting started using SASPy® and the SAS® kernel for Jupyter Notebook

SASPy and the SAS kernel for Jupyter Notebook enable you to connect to SAS® 9.4 and the SAS® Viya® compute server from your client machine. You can then interact with SAS and SAS Viya via Python. If you are not familiar with SASPy and the SAS kernel, this article provides an introduction.

Getting started using SASPy® and the SAS® kernel for Jupyter Notebook was published on SAS Users.

Add Table of Contents to your Jupyter Notebook

Jupyter notebook does not support Table Of Contents (ToC) out of box, unlike R Markdown. There are nbextensions that ppl made to support this. It is easy to add this capability, following these steps to add Table of Contents to your notebook:

 1. Find your Jupyter Notebook data directory by using this command in your DOS console:
          a. Jupyter –data-dir

2. Copy the following two files into your Jupyter data directory:
           https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.js
           https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/toc.css

3. Run this command:
           a. Jupyter nbextension enable toc –user

4. In your Jupyter Notebook, add this command to a MarkDown cell on top of your notebook:
           a. &lt div id=”toc” &gt &lt /div &gt

One caveat is that all headings will be listed in ToC, including your Title (if there is one). One easy work around is to write your title in Word, save a screenshot into an image, save the image file to the same folder as your notebook is, then use the following command in the top Markdown cell:

 &lt div style=”float: left;” &gt &lt img src=”Title.png” height=”200″ width=”800″&gt &lt /div &gt