the result is dataframe with rows without any missing dates the output dataframe is depicted in figure - figure - dataframe without any missing date information often dropping rows is very expensive and unfeasible option in many scenariosmissing values are imputed using the help of other values in the dataframe one commonly used trick is to replace missing values with central tendency measure like mean or median one may also choose other sophisticated measures/statistics as well in our datasetthe price column seems to have some missing data we utilize the fillna(method from pandas to fill these values with mean price value from our dataframe on the same lineswe use the ffill(and bfill(functions to impute missing values for the user_type attribute sinceuser_type is string type attributewe use proximity based solution to handle missing values in this case the ffill(and bfill(functions copy forward the data from the previous row (forward fillor copy the value from the next row (backward fillthe following snippet showcases the three functions print("fill missing price values with mean price::df_dropped['price'fillna(value=np round(df price mean(),decimals= )inplace=trueprint("fill missing user_type values with value from previous row (forward fill::df_dropped['user_type'fillna(method='ffill',inplace=trueprint("fill missing user_type values with value from next row (backward fill::df_dropped['user_type'fillna(method='bfill',inplace=trueapart from these waysthere are certain conditions where record is not much of use if it has more than certain threshold of attribute values missing for instanceif in our dataset transaction has less than three attributes as non-nullthe transaction might almost be unusable in such scenarioit might be advisable to drop that data point itself we can filter out such data points using the function dropna(with the parameter thresh set to the threshold of non-null attributes more details are available on the official documentation page