Visualize Missing Values with Missingno

栏目: IT技术 · 发布时间: 4年前

内容简介:Explore the missing values in your dataset.Data is the new fuel. However, the raw data is cheap. We need to process it well to take the most value out of it. Complex, well-structured models are as good as the data we feed to it. Thus, data needs to be clea

Visualize Missing Values with Missingno

Explore the missing values in your dataset.

Photo by Irina on Unsplash

Data is the new fuel. However, the raw data is cheap. We need to process it well to take the most value out of it. Complex, well-structured models are as good as the data we feed to it. Thus, data needs to be cleaned and processed thoroughly in order to build robust and accurate models.

One of the issues that we are likely to encounter in raw data is missing values. Consider a case where we have features (columns in a dataframe) on some observations (rows in a dataframe). If we do not have the value in a particular row-column pair, then we have a missing value. We may have only a few missing values or half of an entire column may be missing. In some cases, we can just ignore or drop the rows or columns with missing values. On the other, there might be some cases in which we cannot afford to drop even a single missing value. In any case, handling missing values process starts with exploring them in the dataset.

Pandas provides functions to check the number of missing values in the dataset. Missingno library takes it one step further and provides the distribution of missing values in the dataset by informative visualizations. Using the plots of missingno , we are able to see where the missing values are located in each column and if there is a correlation between missing values of different columns. Before handling missing values, it is very important to explore them in the dataset. Thus, I consider missingno as a highly valuable asset in data cleaning and preprocessing steps.

In this post, we will explore the functionalities of missingno plot by going through some examples.

Let’s first try to explore a dataset about the movies on streaming platforms. The dataset is available here on kaggle.

import numpy as np
import pandas as pddf = pd.read_csv("/content/MoviesOnStreamingPlatforms.csv")
print(df.shape)
df.head()

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

数据结构与算法分析

数据结构与算法分析

张琨、张宏、朱保平 / 人民邮电出版社 / 2016-2-1 / 45

本书共分10章,主要包括第1章绪论,第2章线性表,第3章栈和队列,第4章串,第5章数组和广义表,第6章 树和二叉树,第7章图,第8章查找,第9章内部排序,第10章算法分析。其内容模块涵盖了课堂教学、习题课教学、实验教学、自学辅导、综合训练等。立体化教材的使用在提高教学效率、增强教学效果、加大教学信息量、培养学生的应用与实践能力。 作者简介一起来看看 《数据结构与算法分析》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

MD5 加密
MD5 加密

MD5 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具