The execution of the code examples provided in this book requires the installation of Python 3.5 or newer on Mac OS X, Linux, or Microsoft Windows. In this book, we will frequently use SciPy, NumPy, Pandas, scikit-learn, statsmodels, matplotlib, and seaborn. Chapter 1, Getting Started with Python Libraries, provides instructions for the installation and advanced tips so that you can work smoothly. Also, the process of installing specific and additional libraries is explained in the respective chapters. Installation of Bokeh is explained in Chapter 5, Data Visualization. Similarly, the installation of NLTK and SpaCy is explained in Chapter 12, Analyzing Textual Data.
We can also install any library or package that you want to explore using the pip command. We need to run the following command with admin privileges:
$ pip install <library name>
We can also install it from our Jupyter Notebook with ! (exclamation mark) before the pip command:
!pip install <library name>
To uninstall a Python library or package installed with pip, use the following command:
$ pip uninstall <library name>
If you are using the digital version of this book, we advise you to type the code yourself or access the code via the GitHub repository (link available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.
Download the example code files
You can download the example code files for this book from GitHub at https://github.com/PacktPublishing/Python-Data-Analysis-Third-Edition. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Download the color images
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here: https://static.packt-cdn.com/downloads/9781789955248_ColorImages.pdf.
Conventions used
In this book, you will find a number of text styles and conventions used throughout this book. Here, we have shown some examples of these styles. Code words in the text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "The other convention the pandas project insists on is the import pandas as pd import statement."
A block of code is set as follows:
# Creating an array
import numpy as np
a = np.array([2,4,6,8,10])
print(a)
Any command-line input or output is written as follows:
$ mkdir
$ cd css
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Select System info from the Administration panel."