Chapter 1. Getting Started in IPython and Jupyter
In writing Python code for data science, I generally go between three modes of working: I use the IPython shell for trying out short sequences of commands, the Jupyter Notebook for longer interactive analysis and for sharing content with others, and interactive development environments (IDEs) like Emacs or VSCode for creating reusable Python packages. This chapter focuses on the first two modes: the IPython shell and the Jupyter Notebook. Use of an IDE for software development is an important third tool in the data scientist’s repertoire, but we will not directly address that here.
Launching the IPython Shell
The text in this part, like most of this book, is not designed to be
absorbed passively. I recommend that as you read through it, you follow
along and experiment with the tools and syntax we cover: the muscle
memory you build through doing this will be far more useful than the
simple act of reading about it. Start by launching the IPython
interpreter by typing ipython on the command line; alternatively, if
you’ve installed a distribution like Anaconda or EPD, there
may be a launcher specific to your system.
Once you do this, you should see a prompt like the following:
Python3.9.2(v3.9.2:1a79785e3e,Feb192021,09:06:10)Type'copyright','credits'or'license'formoreinformationIPython7.21.0--AnenhancedInteractivePython.Type'?'forhelp.In[1]:
With that, you’re ready to follow along.