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! 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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Python Business Intelligence Cookbook
Python Business Intelligence Cookbook

Python Business Intelligence Cookbook: Leverage the computational power of Python with more than 60 recipes that arm you with the required skills to make informed business decisions

eBook
$32.39 $35.99
Paperback
$43.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Python Business Intelligence Cookbook

Chapter 1. Getting Set Up to Gain Business Intelligence

In this chapter, we will cover the following recipes:

  • Installing Anaconda
  • Installing, configuring, and running MongoDB
  • Installing Rodeo
  • Starting Rodeo
  • Installing Robomongo
  • Using Robomongo to query MongoDB
  • Downloading the UK Road Safety Data dataset

Introduction

In this chapter, you'll get fully set up to perform business intelligence tasks with Python. We'll start by installing a distribution of Python called Anaconda. Next, we'll get MongoDB up and running for storing data. After that, we'll install additional Python libraries, install a GUI tool for MongoDB, and finally take a look at the dataset that we'll be using throughout this book.

Without further ado, let's get started!

Installing Anaconda

Throughout this book, we'll be using Python as the main tool for performing business intelligence tasks. This recipe shows you how to get a specific Python distribution—Anaconda, installed.

Getting ready

Regardless of which operating system you use, open a web browser and browse to the Anaconda download page at http://continuum.io/downloads.

The download page will automatically detect your operating system.

How to do it…

In this section, we have listed the steps to install Anaconda for all the major operating systems: Mac OS X, Windows, and Linux.

Mac OS X 10.10.4

  1. Click on the I WANT PYTHON 3.4 link. We'll be using Python 3.4 throughout this book.
  2. Next, click on the Mac OS X — 64-Bit Python 3.4 Graphical Installer button to download Anaconda.
  3. Once the download completes, browse your computer to find the downloaded Anaconda, and double-click on the Anaconda installer file (a .pkg file) to begin the installation.
  4. Walk through the installer steps to complete the installation. I recommend keeping the default settings.
  5. To verify that Anaconda is installed correctly, open a terminal and type the following command:
    python
    
  6. If the installer was successful, you should see something like this:
    Mac OS X 10.10.4

Windows 8.1

  1. Click on the I WANT PYTHON 3.4 link. We'll be using Python 3.4 throughout this book.
  2. Next, click on the Windows 64-Bit Python 3.4 Graphical Installer button to download Anaconda.
  3. Once the download completes, browse your computer to find the downloaded Anaconda, and double-click on the Anaconda3-2.3.0-Windows-x86_64.exe file to begin the installation.
  4. Walk through the installer steps to complete the installation. I recommend keeping the default settings.
  5. To verify that Anaconda has installed correctly, open a terminal, or open a command prompt in Windows. Now type the following command:
    python
    
  6. If the installation was successful, you should see something like this:
    Windows 8.1

Linux Ubuntu server 14.04.2 LTS

Linux servers have no graphical user interface (GUI), so you'll first need to log into your server and get a command prompt. With that complete, do the following:

  1. On the Anaconda downloads page, select Linux.
  2. Choose the Python 3.4 link.
  3. Right-click on the Linux X 64-Bit button, and copy the link.
  4. At the command prompt on your server, use curl to download the file, pasting the following download link:
    curl –O <LINK TO DOWNLOAD>
    
  5. I've created a special shortcut on my website that is a bit easier to type at the command line: http://robertwdempsey.com/anaconda3-linux.
  6. Once Anaconda downloads, use the following command to start the installer:
    bash Anaconda3-2.3.0-Linux-x86_64.sh
    
  7. Accept the license agreement to begin installation.
  8. When asked if you would like Anaconda to prepend the Anaconda3 install location to the PATH variable, type yes.
    • To have the PATH update take effect immediately after the installation completes, type the following command in the command line:
      source ~/.bashrc
      
  9. Once the installation is complete, verify the installation by typing python in the command line. If everything worked correctly, you should see something like this:
    Linux Ubuntu server 14.04.2 LTS

How it works…

Anaconda holds many advantages over downloading Python from http://www.python.org or using the Python distribution included with your computer, some of which are as follows:

  • Almost 90 percent of what you'll use on a day-to-day basis is already included. In fact, it contains over 330 of the most popular Python packages.
  • Using Anaconda on both the computer you use for development and the server where your solutions will be deployed helps ensure that you are using the same version of the Python packages that your applications require.
  • It's constantly updated; so, you will always be using the latest version of Python and the Python packages.
  • It works on all the major operating systems—Linux, Mac, and Windows.
  • It comes with tools to connect and integrate with Microsoft Excel.

At the time of writing this, the current version of Anaconda for Python 3 is 2.3.0.

Learn about the Python libraries we will be using

Seven Python libraries make up our Python business intelligence toolkit:

  • Pandas: A set of high-performance, easy-to-use data structures and data analysis tools. Pandas are the backbone of all our business intelligence tasks.
  • Scikit-learn: Gives us simple and efficient tools for data mining and data analysis including classification, regression, clustering, dimensionality reduction, model selection, and preprocessing. This will be the workhorse library for our analysis.
  • Numpy: An efficient multi-dimensional container of generic data that allows for arbitrary datatypes to be defined. We won't use numpy directly; however, Pandas relies on it.
  • Matplotlib: A 2D plotting library. We'll use this to generate all our charts.
  • PyMongo: Allows us to connect to and use MongoDB. We'll use this to insert and retrieve data from MongoDB.
  • XlsxWriter: This allows us to access and create Microsoft Excel files. This library will be used to generate reports in the Excel format.
  • IPython Notebook (Jupyter): An interactive computational environment. We'll use this to write our code so that we can get feedback faster than running a script over and over again.

Installing, configuring, and running MongoDB

In this section, you'll see how to install, configure, and run MongoDB on all the major operating systems—Mac OS X, Windows, and Linux.

Getting ready

Open a web browser and visit: https://www.mongodb.org/downloads.

How to do it…

Mac OS X

The following steps explain how to install, configure, and run MongoDB on Mac OS X:

  1. On the download page, click on the Mac OS X tab, and select the version you want.
  2. Click on the Download (TGZ) button to download MongoDB.
  3. Unpack the downloaded file and copy to any directory that you like. I typically create an Applications folder in my home directory where I install apps like this.
  4. For our purpose, we're going to set up a single instance of MongoDB. This means there is literally nothing to configure. To run MongoDB, open a command prompt and do the following:
    • At the root of your computer, make a data directory:
      sudo mkdir data
      
    • Make your user the owner of the directory using the chown command:
      chown your_user_name:proper_group data
      
    • Go to the directory where you have MongoDB.
    • Go to the MongoDB directory.
    • Type the following command:
      ./mongod
      
  5. You should see the following output from Mongo:

    Mac OS X

Windows

The following steps explain how to install, configure, and run MongoDB on Windows:

  1. Click on the Windows tab, and select the version you want.
  2. Click on the Download (MSI) button to download MongoDB.
  3. Once downloaded, browse to the folder where Mongo was downloaded, and double-click on the installer file.

    When asked which setup type you want, select Complete

  4. Follow the instructions to complete the installation.
  5. Create a data folder at C:\data\db. MongoDB needs this directory in order to run. This is where, by default, Mongo is going to store all its database files.
  6. Next, at the command prompt, navigate to the directory where Mongo was installed and run Mongo:
    cd C:\Program Files\MongoDB\Server\3.0\bin
    Mongod.exe
    
  7. If you get any security warnings, give Mongo full access.
  8. You should see an output like the following screenshot from Mongo, letting you know it's working:

    Windows

Linux

The easiest way to install MongoDB in Linux is by using apt. At the time of writing, there are apt packages for 64-bit long-term support Ubuntu releases, specifically 12.04 LTS and 14.04 LTS. Since the URL for the public key can change, please visit the Mongo Installation Tutorial to ensure that you have the most recent one: https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/.

Install Mongo as follows:

  1. Log in to your Linux box
  2. Import the public key:
    sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --  recv 7F0CEB10
    
  3. Create a list file for MongoDB:
    echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
    
  4. Update apt:
    sudo apt-get update
    
  5. Install the latest version of Mongo:
    sudo apt-get install -y mongodb-org
    
  6. Run Mongo with the following command:
    sudo service mongod start
  7. Verify that MongoDB is running by checking the contents of the log file at /var/log/mongodb/mongod.log for a line that looks like this: [initandlisten] waiting for connections on port 27017
  8. You can stop MongoDB by using the following mongod command:
    sudo service mongod stop
    
  9. Restart MongoDB with this command:
    sudo service mongod restart
    

    Note

    MongoDB log file location

    MongoDB stores its data files in /var/lib/mongodb and its log files in /var/log/mongodb.

How it works…

MongoDB's document data model makes it easy for you to store data of any structure and to dynamically modify the schema. In layman's terms, MongoDB provides a vast amount of flexibility when it comes to storing your data. This comes in very handy when we import our data. Unlike with an SQL database, we won't have to create a table, set up a scheme, or create indexes—all of that will happen automatically when we import the data.

Installing Rodeo

IPython Notebook, an interactive, browser-based tool for developing in Python, has become the de facto standard for creating and sharing code. We'll be using it throughout this book. The Python library that we're about to install—Rodeo—is an alternative you can use. The difference between IPython Notebook and Rodeo is that Rodeo has a built-in functionality to view data in a Pandas data frame, a functionality that can come in handy when you want to view, real-time, the changes that you are making to your data. Having said that, IPython Notebook is the current standard.

Getting ready

To use this recipe, you need a working installation of Python.

How to do it…

Regardless of the operating system, you install Rodeo with the following command:

pip install rodeo

That's all there is to it!

How it works…

The pitch for Rodeo is that it's a data centric IDE for Python. I use it as an alternative to IPython Notebook when I want to be able to view the contents of my Pandas data frames while working with my data. If you've ever used a tool like R Studio, Rodeo will feel very familiar.

Starting Rodeo

Using this recipe, you will get to learn how to start Rodeo.

Getting ready

To use this recipe, you need to have Rodeo installed.

How to do it…

To start an instance of Rodeo, change to the directory where you want to run it, and type the following command in your working directory:

rodeo .

Once Rodeo is up and running, open a browser and enter the following URL:

http://localhost:5000

Once there, you should see something like this:

How to do it…

Installing Robomongo

Robomongo is a GUI tool for managing MongoDB that runs on Mac OS X, Windows, and Linux. It allows you to create new databases and collections and to run queries. It gives you the full power of the MongoDB shell in a GUI application, and has features including multiple shells, multiple results, and autocompletion. And to top it all, it's free.

Getting ready

Open a web browser, and browse to http://robomongo.org/.

How to do it…

Mac OS X

The following steps explain how to install Robomongo on Mac OS X:

  1. Click on the Download for Mac OS X button.
  2. Click on the Mac OS X Installer (.dmg) link to download the file.
  3. Once downloaded, double-click on the installer file.
  4. Drag the Robomongo application to the Applications folder.
  5. Open the Applications folder, and double-click on Robomongo to start it up.
  6. In the MongoDB Connections window, create a new connection:
    Mac OS X
  7. Click on Save.
  8. Highlight your new connection and click on Connect.
  9. Assuming that you have MongoDB running, you should see the default system database.

Windows

The following steps explain how to install Robomongo on Windows:

  1. Click on the Download for Windows button.
  2. Click on the Windows Installer (.exe) link to download the file.
  3. Once downloaded, double-click on the installer file, and follow the install instructions, accepting all the defaults.
  4. Finally, run Robomongo.
  5. In the MongoDB Connections window, create a new connection:
    Windows
  6. Click on Save.
  7. Highlight your new connection, and click on Connect.
  8. In the View menu, select Explorer to start browsing the existing MongoDB databases. As this is a brand new instance, you will only have the system collection.

Using Robomongo to query MongoDB

Robomongo allows you to run any query against a MongoDB that would use the MongoDB command-line utility. This is a great way to test the queries that you'll write and to view the results.

Getting ready

To use this recipe, you need to have a working installation of MongoDB and have Robomongo installed.

How to do it…

You can use Robomongo to run any query against MongoDB that you would run at the command line. Use the following command to retrieve a single record:

db.getCollection('accidents').findOne()

You can view the results in multiple formats:

  • Tree mode
  • Table mode
  • Text mode

By default, Robomongo will show you the results in tree mode as shown in the following screenshot:

How to do it…

Downloading the UK Road Safety Data dataset

In this section, we're going to download and take a bird's eye view of the dataset we'll be using throughout this book—the UK Road Safety Data. In total, this dataset provides more than 15 million rows across three CSV files.

How to do it…

  1. Visit the following URL: http://data.gov.uk/dataset/road-accidents-safety-data/resource/80b76aec-a0a1-4e14-8235-09cc6b92574a.
  2. Click on the red Download button on the right side of the page. I suggest creating a data directory to hold the data files.
  3. Unpack the provided zip files in the directory you created.
  4. You should see the following four files included in the expanded directory:
    • Accidents7904.csv
    • Casualty7904.csv
    • Road-Accident-Safety-Data-Guide-1979-2004.xls
    • Vehicles7904.csv

How it works…

The CSV files contain the data that we are going to use in the recipes throughout this book. The Excel file is pure magic, though. It contains a reference for all the data, including a list of the fields in each dataset as well as the coding used.

Coding data is a very important preprocessing step. Most analysis tools that you will use expect to see numbers rather than labels such as city or road type. The reason for this is that computers don't understand context like we humans do. Is Paris a city or a person? It depends. Computers can't make that judgment call. To get around this, we assign numbers to each text value. That's been done with this dataset.

Why we are using this dataset

It is said that up to 90 percent of the time spent on most data projects is for preparing the data for analysis. Anecdotal evidence from this author and those I speak with holds this to be true. While you will learn a number of techniques for cleaning and standardizing data, also known as preprocessing in the data world, the UK Road Safety Data dataset is an analysis-ready dataset. In addition, it provides a large amount of data—millions of rows—for us to work with.

This dataset contains detailed road safety data about the circumstances of personal injury road accidents in GB from 1979, the types (including Make and Model) of vehicles involved and the consequential casualties.

Left arrow icon Right arrow icon

Key benefits

  • *Want to minimize risk and optimize profits of your business? Learn to create efficient analytical reports with ease using this highly practical, easy-to-follow guide.
  • *Learn to apply Python for business intelligence tasks—preparing, exploring, analyzing, visualizing and reporting—in order to make more informed business decisions using data at hand
  • *Learn to explore and analyze business data, and build business intelligence dashboards with the help of various insightful recipes

Description

The amount of data produced by businesses and devices is going nowhere but up. In this scenario, the major advantage of Python is that it's a general-purpose language and gives you a lot of flexibility in data structures. Python is an excellent tool for more specialized analysis tasks, and is powered with related libraries to process data streams, to visualize datasets, and to carry out scientific calculations. Using Python for business intelligence (BI) can help you solve tricky problems in one go. Rather than spending day after day scouring Internet forums for “how-to” information, here you’ll find more than 60 recipes that take you through the entire process of creating actionable intelligence from your raw data, no matter what shape or form it’s in. Within the first 30 minutes of opening this book, you’ll learn how to use the latest in Python and NoSQL databases to glean insights from data just waiting to be exploited. We’ll begin with a quick-fire introduction to Python for BI and show you what problems Python solves. From there, we move on to working with a predefined data set to extract data as per business requirements, using the Pandas library and MongoDB as our storage engine. Next, we will analyze data and perform transformations for BI with Python. Through this, you will gather insightful data that will help you make informed decisions for your business. The final part of the book will show you the most important task of BI—visualizing data by building stunning dashboards using Matplotlib, PyTables, and iPython Notebook.

Who is this book for?

This book is intended for data analysts, managers, and executives with a basic knowledge of Python, who now want to use Python for their BI tasks. If you have a good knowledge and understanding of BI applications and have a “working” system in place, this book will enhance your toolbox.

What you will learn

  • * Install Anaconda, MongoDB, and everything you need to get started with your data analysis
  • * Prepare data for analysis by querying cleaning and standardizing data
  • * Explore your data by creating a Pandas data frame from MongoDB
  • * Gain powerful insights, both statistical and predictive, to make informed business decisions
  • * Visualize your data by building dashboards and generating reports
  • * Create a complete data processing and business intelligence system
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Dec 22, 2015
Length: 202 pages
Edition : 1st
Language : English
ISBN-13 : 9781785287466
Category :
Languages :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Dec 22, 2015
Length: 202 pages
Edition : 1st
Language : English
ISBN-13 : 9781785287466
Category :
Languages :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 141.97
Python GUI Programming Cookbook
$48.99
Python Data Visualization Cookbook (Second Edition)
$48.99
Python Business Intelligence Cookbook
$43.99
Total $ 141.97 Stars icon

Table of Contents

6 Chapters
1. Getting Set Up to Gain Business Intelligence Chevron down icon Chevron up icon
2. Making Your Data All It Can Be Chevron down icon Chevron up icon
3. Learning What Your Data Truly Holds Chevron down icon Chevron up icon
4. Performing Data Analysis for Non Data Analysts Chevron down icon Chevron up icon
5. Building a Business Intelligence Dashboard Quickly Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.6
(9 Ratings)
5 star 33.3%
4 star 11.1%
3 star 33.3%
2 star 22.2%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




CS Mar 22, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book for all Python programmers wanting to implement BI functionalities. Well, it covers only one database, which is MongoDB, but you can always start with something. This book has good content and lot of recipes that cover setting up your environment, importing data, cleanig up of data and then analyzing it. Good book to start with, if you are into Python and BI functionalities.
Amazon Verified review Amazon
Rook501 Feb 11, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is precisely what I was looking for. Python is great with data and generating valuable business intelligence and this book does a great job getting you started.
Amazon Verified review Amazon
Utsav Narayan Singh Jan 13, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book provides a good coverage of all topics for anyone planning to develop business intelligence solutions using Python. The books provides many recipies that cover setting up your environment, importing data, cleanig up of data and then analysing it. A promninent feature of the book is that it is platform agnostic and is suitable for everyone whether he is using Windows, Linx or OSX. I thouroughly enjoyed discovering new recipies in this book and jave used it as a reference from time to time.Note: I was reviewer of this book.
Amazon Verified review Amazon
Alex Meadows Feb 15, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
Python Business Intelligence Cookbook is a good introduction to the basics of Pandas and working with csv files and MongoDB. One of the books few shortcomings is the lack of recipes showing interaction with a traditional RDBMS. While it can be understood that due to the variety and intermediate complexity that accessing a SQL database directly is out of scope for the book, it would have been nice to provide some reference to start with. That said, the various data types and process for analyzing, organizing, and visualizing data is spot on. The author even dives into predictive analytics. If you are looking for a general overview then this is a decent place to start.To note: I was asked by the publisher to provide this review in return for a free book. This did not impact my review.
Amazon Verified review Amazon
Ed P Feb 09, 2016
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
If you are Python programmer introducing BI functionality to your applications then this would be a good starting point. The content is reasonably good, but for many of the tasks covered, similar results could be achieved much quicker and easier with dedicated Business Intelligence tools for ETL and reporting. Also, the database used is MongoDB. There is no coverage of many popular NoSQL and RDBMS systems such as MySQL, PostgreSQL, SQL Server, Hadoop and Oracle that are likely to be used in the corporate world. But as a starting point some of these recipes could be adapted to use other systems as well. All in all, a decent effort, but somewhat limited in applicability
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon