Difference between revisions of "Jupyter"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
*[https://www.dataquest.io/blog/jupyter-notebook-tutorial/ Dataquest.io] has a very good tutorial on how to use Jupyter, the other interface besides Spyder for running Python code. | *[https://www.dataquest.io/blog/jupyter-notebook-tutorial/ Dataquest.io] has a very good tutorial on how to use Jupyter, the other interface besides Spyder for running Python code. | ||
− | *It looks like the main use of Jupyter is to save Python input and output in a convenient way. A *.py file just has the input. A Jupyter file runs in a browser window, but that doesn't seem to be important. | + | *It looks like the main use of Jupyter is to save Python input and output in a convenient way. A *.py file just has the input. A Jupyter file runs in a browser window, but that doesn't seem to be important. Jupyter also divides the programs into cells, sections, so you can in Cells select "Run Cells and selection below" to run the current cell and move down to the next cell. |
*When I use Jupyter, search for Jupyter on my computer, launch it, and then do not shut off the black box that will appear along with the app itself (or it will stop working right). | *When I use Jupyter, search for Jupyter on my computer, launch it, and then do not shut off the black box that will appear along with the app itself (or it will stop working right). |
Revision as of 18:28, 31 July 2021
- Dataquest.io has a very good tutorial on how to use Jupyter, the other interface besides Spyder for running Python code.
- It looks like the main use of Jupyter is to save Python input and output in a convenient way. A *.py file just has the input. A Jupyter file runs in a browser window, but that doesn't seem to be important. Jupyter also divides the programs into cells, sections, so you can in Cells select "Run Cells and selection below" to run the current cell and move down to the next cell.
- When I use Jupyter, search for Jupyter on my computer, launch it, and then do not shut off the black box that will appear along with the app itself (or it will stop working right).
- To put something into Markdown comment language instead of Python, switch the box at the top of the editor from Code to Markdown.
- Jupyter can be configured in Python to have a non-default home directory. Or, these Python commands are convenient:
import os; os.chdir('c:\\Users\\erasmuse\\Downloads\\') %pwd is a Jupyter "magic" command that says the present working directory.
- You don't have to use the print command to get the value of a new variable to show if it is the last command in a cell. This is interactive, a shell not batch. Sort of. Except you do have to keep Running cells.