MACHINE LEARNING RECIPES
DATA CLEANING PYTHON
DATA MUNGING
PANDAS CHEATSHEET
ALL TAGS
# How to calculate skewness and kurtosis using pandas?

# How to calculate skewness and kurtosis using pandas?

This recipe helps you calculate skewness and kurtosis using pandas

Skewness is a measure of asymmetry of a distribution. Kurtosis describes the peakedness of the distribution.

So this recipe is a short example on How to calculate skewness and kurtosis using pandas. Let's get started.

```
import pandas as pd
import seaborn as sb
```

Let's pause and look at these imports. Pandas is generally used for performing mathematical operation and preferably over arrays. Seaborn is just used in here to import dataset.

```
df = sb.load_dataset('tips')
```

Here we have imported tips dataset from seaborn library.

Now our dataset is ready.

```
print(df['total_bill'].astype(float).skew())
print(df['total_bill'].astype(float).kurt())
```

Using skew() and kurt() function we have drawn the skewness and kurtosis of total_bill distribution.

Once we run the above code snippet, we will see:

1.1332130376158205 1.2184840156638854

Results of our calculation can be seen in here.

In this data science project, you will predict borrowers chance of defaulting on credit loans by building a credit score prediction model.

Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

In this human activity recognition project, we use multiclass classification machine learning techniques to analyse fitness dataset from a smartphone tracker.

In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.

In this deep learning project, you will learn how to build your custom OCR (optical character recognition) from scratch by using Google Tesseract and YOLO to read the text from any images.

Music Recommendation Project using Machine Learning - Use the KKBox dataset to predict the chances of a user listening to a song again after their very first noticeable listening event.

In this machine learning pricing project, we implement a retail price optimization algorithm using regression trees. This is one of the first steps to building a dynamic pricing model.

Data Science Project in Python- Given his or her job role, predict employee access needs using amazon employee database.

The goal of this data science project is to build a predictive model and find out the sales of each product at a given Big Mart store.

In this R data science project, we will explore wine dataset to assess red wine quality. The objective of this data science project is to explore which chemical properties will influence the quality of red wines.