Search icon CANCEL
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
Data Science for Marketing Analytics

You're reading from   Data Science for Marketing Analytics Achieve your marketing goals with the data analytics power of Python

Arrow left icon
Product type Paperback
Published in Mar 2019
Publisher
ISBN-13 9781789959413
Length 420 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Tommy Blanchard Tommy Blanchard
Author Profile Icon Tommy Blanchard
Tommy Blanchard
Debasish Behera Debasish Behera
Author Profile Icon Debasish Behera
Debasish Behera
Pranshu Bhatnagar Pranshu Bhatnagar
Author Profile Icon Pranshu Bhatnagar
Pranshu Bhatnagar
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Data Science for Marketing Analytics
Preface
1. Data Preparation and Cleaning 2. Data Exploration and Visualization FREE CHAPTER 3. Unsupervised Learning: Customer Segmentation 4. Choosing the Best Segmentation Approach 5. Predicting Customer Revenue Using Linear Regression 6. Other Regression Techniques and Tools for Evaluation 7. Supervised Learning: Predicting Customer Churn 8. Fine-Tuning Classification Algorithms 9. Modeling Customer Choice Appendix

Visualizing Data


An important aspect of exploring data is to be able to represent the data visually. When data is represented visually, the underlying numbers and distribution become very easy to understand and differences become easy to spot.

Plots in Python are very similar to those in any other paradigm of traditional marketing analytics. We can directly make use of our previous understanding of plots and use them in Python. pandas supports inbuilt functions to visualize the data in them through the plot function. You can choose which ones are which via the kind parameter to the plot function. Some of the most commonly used ones, as used on sales.csv, are as follows:

  • kde or density for density plots

  • bar or barh for bar plots

  • box for boxplot

  • area for area plots

  • scatter for scatter plots

  • hexbin for hexagonal bin plots

  • pie for pie plots

You can specify which values to pass as the x and y axes by specifying the column names as x and y in the DataFrames.

Exercise 9: Visualizing Data With pandas...

You have been reading a chapter from
Data Science for Marketing Analytics
Published in: Mar 2019
Publisher:
ISBN-13: 9781789959413
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 £16.99/month. Cancel anytime