Valentina Porcu
Python for Data Mining Quick Syntax Reference
Valentina Porcu
Nuoro, Italy
ISBN 978-1-4842-4112-7e-ISBN 978-1-4842-4113-4
Library of Congress Control Number: 2018966554
© Valentina Porcu 2018
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein.
Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
Introduction

Translated by Nicola Menicacci

Python is an interpreted, interactive, and object-oriented language. It features a library of functions, is extendable (as it can be used to create new modules easily), and is available for all operating systems. For these and other reasons, it is also one of the most used programming languages when it comes to data mining and machine learning.

My goal is to accompany you as you start to study this programming language, show you basic concepts, and then help you move on to data mining. We’ll begin by looking at how to use Python and its structures, how to install Python, and how to determine which tools are best suited for data analysis, and then switch to an introduction to data mining packages. Python for Data Mining Quick Syntax Reference is an introductory book. It provides guidance—from taking your first programming steps with Python, to manipulating and importing datasets, to examining examples of data analysis. It does not explain fully topics such as machine learning and statistics using Python, which are beyond the scope of this volume.

Who This Book Is For

This book is intended for those of you who want to gain a better understanding of the Python programming language from a data analysis perspective. We will start by reviewing Python’s basic concepts, then focus on the most used packages for data analysis. To download the code, to delve more deeply into some topics, and to acquire more practical information about Python and data mining, please visit my website ( Datawiring.me ). From the site’s home page, you can subscribe to my newsletter to receive updates about the latest in Python coding and other news. My advice for those of you who are beginning programmers is to write the code manually to gain a greater understanding of it.

How This Book Is Organized

Python for Data Mining Quick Syntax Reference consists of 11 chapters. In Chapter 1 , we look at some basic installation concepts and the tools available for programming in Python. We also examine differences between Python2 and Python3 and learn how to set up a work folder.

In Chapter 2 , we study some basic concepts about creating objects, entering comments, and reserving words for the system; and look at the various types of operators that are part of the grammar of the Python programming language.

In Chapter 3 , we extend our work with basic Python structures—such as tuples, lists, dictionaries, sets, strings, and files—and learn how to create and convert them.

In Chapter 4 , we create small, basic functions and learn how to save them.

Chapter 5 deals with conditional instructions that allow us to extend the power of a function. In addition, we review other important functions as well.

In Chapter 6 , we investigate basic concepts related to object-oriented programming and examine the concepts of modules, methods, and error handling.

Chapter 7 is dedicated to importing files using some of the basic features we have learned. We learn how to open and edit text files in .csv format, in addition to various other formats.

Chapters 8 through 11 explain Python’s most important data mining packages: NumPy and SciPy for mathematical functions and random data generation, pandas for dataframe management and data import, Matplotlib for drawing charts, and scikit-learn for machine learning. With regard to scikit-learn, the discussion is limited to basic coverage of the code of the various algorithms. Because of the complexity of the topic, we do not examine the details for the various techniques.

Table of Contents

Index 255

About the Author and About the Technical Reviewer

About the Author

Valentina Porcu

is a computer geek with a passion for data mining and research, and a PhD in communication and complex systems. She has years of experience in teaching in universities in Italy, France, and Morocco—and online, of course! She works as a consultant in the field of data mining and machine learning, and enjoys writing about new technologies and data mining. She spent the past nine years working as freelancer and researcher in the field of social media analysis, benchmark analysis, and web scraping for database building, in particular in the field of buzz analysis and sentiment analysis for universities, startups, and web agencies across the United Kingdom, France, the United States, and Italy. Valentina is the founder of Datawiring, a popular Italian data science resource.

 

About the Technical Reviewer

Karpur Shukla
../images/469457_1_En_BookFrontmatter_Figb_HTML.jpg

is a research fellow at the Centre for Mathematical Modeling at Flame University in Pune, India. His current research interests focus on nonequilibrium fluctuation theorems for models of topological quantum field theories (with application to topological quantum computing) and models of reversible computing. He received an MS in physics from Carnegie Mellon University, with a background in theoretical analysis of materials for spintronics applications as well as Monte Carlo simulations for the renormalization group of finite-temperature spin lattice systems.

 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.117.76.204