Numpy, Data Cleaning.
values has_missing = np.isnan(data) print(has_missing) import numpy as np data = np.array([1, 2, np.nan, 4, 5]) mean_value = np.nanmean(data) # Compute mean ignoring NaN data[np.isnan(data)] = mean_value # Replace NaN with mean Section 4- Removing Rows or Columns with Missing Values We can use