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()

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

查看所有标签

猜你喜欢:

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

PHP 5权威编程

PHP 5权威编程

(美)古曼兹等 / 简张桂 / 电子工业出版社 / 2007-12 / 90.00元

《BRUCE PERENS开源系列丛书•PHP 5权威编程》为大家全面介绍了PHP 5中的新功能、面向对象编程方法及设计模式,还分析阐述了PHP5中新的数据库连接处理、错误处理和XML处理等机制。希望能够帮助读者系统了解、熟练掌握PHP,最大程度地挖掘:PHP的潜力,以更低的成本搭建更加稳健、高效的PHP应用。 近年来,随着使用PHP的大流量网站逐渐增加,企业在使用PHP的时候开始面临新的问......一起来看看 《PHP 5权威编程》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试