How to use operators in Google Analytics API queries

To extract specific data from the Google Analytics API you will often need to use segments and filters to ensure you get the data you want. For example, you might...

How to calculate abandonment and completion rates using the Google Analytics API

Google Analytics provides a useful Shopping Behaviour Analysis report that lets you examine the volumes of users who are performing important actions on your ecommerce website, such as viewing products,...

How to use CountVectorizer for n-gram analysis

CountVectorizer is a scikit-learn package that uses count vectorization to convert a collection of text documents to a matrix of token counts. Given a corpus of text documents, such as...

How to use try except for Python exception handling

Exceptions are events that can modify the flow of control through a Python application and are triggered when errors occur. When writing production code it’s a good idea to both...

How to use the Pip Python package manager

Pip is a command line application that allows you to install, upgrade, and remove Python packages from your development environment using simple commands. It works just like the Aptitude or...

How to calculate the time difference between two dates in Pandas

Calculating the time difference between two dates in Pandas can yield useful information to aid your analysis, help you understand the data, and guide a machine learning model on making...

How to use the Dropbox API with Python

Dropbox is one of the most widely used file storage and file sharing platforms and is used by a wide variety of businesses. Dropbox has put the effort into building...

How to send emails using the Mailchimp Transactional email API

While Mailchimp is best known for its email marketing functionality, it also includes an excellent transactional email API designed to allow developers to send transactional emails from their applications.

How to Dockerize a data science application

The phrase “It works on my machine” is a common one in most offices with a data science department. It’s very common to write an application that works perfectly in...