This code reads in an Excel file located at 'D:\incom.xlsx' using the pandas library and assigns it to the variable 'income'.

The next line of code applies a lambda function to the 'income' dataframe. This lambda function takes each column of the dataframe and checks how many values in that column are null (i.e. NaN or missing values). The np.sum() function is used to sum up the number of null values in each column.

The output of this code will be a series of the sum of null values for each column in the 'income' dataframe.

Python Pandas: Detecting Missing Values in Excel Data

原文地址: https://www.cveoy.top/t/topic/o0hi 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录