课程: Machine Learning with Python: Foundations

今天就学习课程吧!

今天就开通帐号,24,100 门业界名师课程任您挑!

How to resolve missing data in Python

How to resolve missing data in Python

- [Instructor] During the exploration, we may find that some of our data is missing or incomplete. Missing data could arise as a result of changes in data collection methods, human error, bias, or simply the lack of reliable input. There are several ways to deal with missing data in Python. To illustrate how to deal with missing values, let's import a sample student dataset from an Excel spreadsheet and preview it. We can see that there are missing values in several of the columns in our data frame in order to list the rows of missing values for a particular column, we make use of the isnull method of a Pandas data frame to create a filter or a mask. For example, we can list a rows in the data frame with missing state values as follows. Mask, students, data frame, specify the column we want, which is state, called the isnull method, and we output our mask. The mask object is a series object, a boolean series object, to…

内容