{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Creating a new notebook" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Open the command palette with the shortcut: `Ctrl/Command` + `Shift` + `P`\r\n", "2. Search for the command `Create New Blank Notebook`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# How to get back to the start page" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "1. Open the command palette with the shortcut: `Ctrl/Command` + `Shift` + `P`\r\n", "\r\n", "2. Search for the command `Python: Open Start Page`" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Getting started" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You are currently viewing what we call our Notebook Editor. It is an interactive document based on Jupyter Notebooks that supports the intermixing of code, outputs and markdown documentation. \r\n", "\r\n", "This cell is a markdown cell. To edit the text in this cell, simply double click on the cell to change it into edit mode.\r\n", "\r\n", "The next cell below is a code cell. You can switch a cell between code and markdown by clicking on the code ![code icon](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/codeIcon.PNG) /markdown ![markdown icon](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/markdownIcon.PNG) icons or using the keyboard shortcut `M` and `Y` respectively." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print('hello world')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* To execute the code in the cell above, click on the cell to select it and then either press the play ![play](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/playIcon.PNG) button in the cell toolbar, or use the keyboard shortcut `Ctrl/Command` + `Enter`.\r\n", "* To edit the code, just click in cell and start editing.\r\n", "* To add a new cell below, click the `Add Cell` icon ![add cell](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/addIcon.PNG) at the bottom left of the cell or enter command mode with the `ESC` Key and then use the keyboard shortcut `B` to create the new cell below.\r\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Features" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Variable explorer**\r\n", "\r\n", "To view all your active variables and their current values in the notebook, click on the variable explorer icon ![variable explorer](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/variableExplorerIcon.PNG) in the top toolbar.\r\n", "\r\n", "![Variable Explorer](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/variableexplorer.png)\r\n", "\r\n", "**Data Viewer**\r\n", "\r\n", "To view your data frame in a more visual \"Excel\" like format, open the variable explorer and to the left of any dataframe object, you will see the data viewer icon ![data viewer](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/dataViewerIcon.PNG) which you can click to open the data viewer.\r\n", "\r\n", "![Data Viewer](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/dataviewer.gif)\r\n", "\r\n", "**Convert to Python File**\r\n", "\r\n", "To export your notebook to a Python file (.py), click on the `Convert to Python script` icon ![Export icon](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/exportIcon.PNG) in the top toolbar \r\n", "\r\n", "![Export](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/savetopythonfile.png)\r\n", "\r\n", "**Plot Viewer**\r\n", "\r\n", "If you have a graph (such as matplotlib) in your output, you'll notice if you hover over the graph, the `Plot Viewer` icon ![Plot Viewer](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/plotViewerIcon.PNG) will appear in the top left. Click the icon to open up the graph in the Plotviewer which allows you to zoom on your plots and export it in formats such as png and jpeg.\r\n", "\r\n", "![Plot Viewer](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/plotviewer.gif)\r\n", "\r\n", "**Switching Kernels**\r\n", "\r\n", "The notebook editor will detect all kernels in your system by default. To change your notebook kernel, click on the kernel status in the top toolbar at the far right. For example, your kernel status may say \"Python 3: Idle\". This will open up the kernel selector where you can choose your desired kernel.\r\n", "\r\n", "![Switching Kernels](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/kernelchange.gif)\r\n", "\r\n", "**Remote Jupyter Server**\r\n", "\r\n", "To connect to a remote Jupyter server, open the command prompt and search for the command `Specify remote or local Jupyter server for connections`. Then select `Existing` and enter the remote Jupyter server URL. Afterwards, you'll be prompted to reload the window and the Notebook will be opened connected to the remote Jupyter server.\r\n", "\r\n", "![Remote](https://raw.githubusercontent.com/microsoft/vscode-python/main/images/remoteserver.gif)" ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "-Rh3-Vt9Nev9" }, "source": [ "# More Resources" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- [Data science tutorial for Visual Studio Code](https://code.visualstudio.com/docs/python/data-science-tutorial)\r\n", "- [Jupyter Notebooks in Visual Studio Code documentation](https://code.visualstudio.com/docs/python/jupyter-support)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3.8.6 64-bit", "metadata": { "interpreter": { "hash": "5c7437588f5ad65b3fb2510dff59138dda524824913550626013373b675d5274" } }, "name": "python3" }, "language_info": { "version": "3.8.6-final" } }, "nbformat": 4, "nbformat_minor": 0 }