Any real-life data-problems will cause the issue of missing data and it is really important that such data points are taken care of in the right way.

Pandas is undoubtedly the most widely-used open-source library for data science and analysis, mostly preferred for ad-hoc data manipulation operations. The credit goes to its extremely flexible data representation using DataFrames and the functions to manipulate data present in these DataFrames.

When we use csv files with null values or missing data to populate a DataFrame, the null/missing values are replaced with NaN(not a number) in DataFrames. To handle missing data, Pandas uses the following functions:

  • Dropna() — removes missing values (rows/columns)
  • Fillna() — Replaces the missing values with user specified values.

Now, let’s try to understand both these pandas functions with the help of examples in detail.

#pandas-dataframe #pandas #data-science

How to Work With Missing Data Using Pandas?
1.85 GEEK