This is the code repository for Practical Data Science with Python, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.
The code from this book and repository is intended for Python 3.9. The datasci.yml file can be used to create a conda virtual environment by running conda env create -f datasci.yml. The conda environment can then be activated with conda activate datasci.
All of the code is organized into folders. Each folder starts with a number followed by the application name. For example, Chapter02.
The code will look like the following:
>>> from sklearn.neighbors import KNeighborsClassifier
>>> knn = KNeighborsClassifier(n_neighbors=5, p=2,
... metric='minkowski')
>>> knn.fit(X_train_std, y_train)
>>> plot_decision_regions(X_combined_std, y_combined,
... classifier=knn, test_idx=range(105,150))
>>> plt.xlabel('petal length [standardized]')
>>> plt.ylabel('petal width [standardized]')
>>> plt.show()
- pip:
- pandas-profiling
- matplotlib-label-lines