Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Data Mining Quick Start Guide

You're reading from   Python Data Mining Quick Start Guide A beginner's guide to extracting valuable insights from your data

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher Packt
ISBN-13 9781789800265
Length 188 pages
Edition 1st Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Nathan Greeneltch Nathan Greeneltch
Author Profile Icon Nathan Greeneltch
Nathan Greeneltch
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Preface 1. Data Mining and Getting Started with Python Tools 2. Basic Terminology and Our End-to-End Example FREE CHAPTER 3. Collecting, Exploring, and Visualizing Data 4. Cleaning and Readying Data for Analysis 5. Grouping and Clustering Data 6. Prediction with Regression and Classification 7. Advanced Topics - Building a Data Processing Pipeline and Deploying It 8. Other Books You May Enjoy

Recommended libraries and how to install

Its easy to add or remove libraries from the Anaconda prompt. Once you have an the preferred environment activated, the simple Conda install command will search the Anaconda cloud repo for a matching package, and will begin download if it exists. Conda will warn if there are version dependencies with your other libraries. Always pay attention to these warnings, so that you know if any other library versions are affected. If, at any time, you need a reminder of what is in your environment, use the Conda list command to check package names and versions.

Let's look at some example commands:

  1. Create a new environment called my_env with Python version 3 using the following command:
(base) $ Conda create -n my_env Python=3
  1. Check whether my_env was created successfully by using the following command:
(base) $ Conda info --envs

You will see the following screen on the execution of the preceding command:

  1. Activate a new environment by using the following command:
(base) $ Conda activate my_env
  1. Install the numpy math library by using the following command:
(my_env) $ Conda install numpy
  1. Use Conda list as follows, to check whether a new library was installed or not and all other libraries and versions in my_env:
(my_env) $ Conda list 

You will see the following screen on the execution of the preceding command:

Recommended libraries

If you choose to manage a smaller environment than the full bundle from Anaconda, I recommend the following essential libraries for data mining. They will be used throughout this book:

  • numpy: The fundamental math library for Python. Brings with it the numpy array data structure.
  • scipy: Provides science and engineering routines built on the base of the numpy array. This library also has some good statistical functions.
  • pandas: Offers relational data tables for storing, labeling, viewing, and manipulating data. You will never look at an array of numbers in the same way for the rest of your career after you've gotten comfortable with pandas and its popular data structure, called a dataframe.
  • matplotlib: Python's core visualization library with line and scatter plots, bar and pie charts, histograms and spectrograms, and so on.
  • seaborn: As statistical visualization library. Built on top of matplotlib and much easier to use. You can build complicated visual representations with, in many cases, a single line of code. This library takes pandas dataframes as input.
  • statsmodels: Library focused on statistics functions and statistical testing. For example, it has a .summary() function that returns helpful summary stats and information about a model you've applied.
  • scikit-learn: Python's workhorse machine learning library. It is easy to use and is maintained by an army of developers. The best part is the documentation on http:\\scikit-learn.org . It is so extensive that one could learn the field of machine learning just by reading though the entirety of it.
Editorial: Python has become ubiquitous in the fields of advanced data analysis in the last decade. This is partially due to the scripting nature of the language and approachability to non-programmers, but that is not the whole story. The pandas, scikit-learn, and seaborn libraries are essential to Python's growth in this domain. The power, ease-of-use, well-defined targeted scope, and open source nature of these three libraries are unmatched among free or paid packages. I recommend you learn them inside and out as you embark on a career in data mining.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime