There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The nunique() method ignores missing values by default."
A block of code is set as follows:
import pandas as pdfrom sklearn.datasets import load_bostonfrom sklearn.model_selection import train_test_splitfrom sklearn.preprocessing import PolynomialFeatures
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
X_train['A7'] = np.where(X_train['A7'].isin(frequent_cat), X_train['A7'], 'Rare')X_test['A7'] = np.where(X_test['A7'].isin(frequent_cat), ...