Dealing with Missing Data in Python
Suraj Donthi
Deep Learning & Computer Vision Learning
airquality['Ozone'].plot(title='Ozone', marker='o', figsize=(30, 5))
ffill_imp['Ozone'].plot(color='red', marker='o', linestyle='dotted', figsize=(30, 5))
airquality['Ozone'].plot(title='Ozone', marker='o')
bfill_imp['Ozone'].plot(color='red', marker='o', linestyle='dotted', figsize=(30, 5))
airquality['Ozone'].plot(title='Ozone', marker='o')
linear_interp['Ozone'].plot(color='red', marker='o', linestyle='dotted', figsize=(30, 5))
airquality['Ozone'].plot(title='Ozone', marker='o')
quadratic_interp['Ozone'].plot(color='red', marker='o', linestyle='dotted', figsize=(30, 5))
airquality['Ozone'].plot(title='Ozone', marker='o')
nearest_interp['Ozone'].plot(color='red', marker='o', linestyle='dotted', figsize=(30, 5))
airquality['Ozone'].plot(title='Ozone', marker='o')
# Create subplots
fig, axes = plt.subplots(3, 1, figsize=(30, 20))
# Create interpolations dictionary
interpolations = {'Linear Interpolation': linear_interp,
'Quadratic Interpolation': quadratic_interp,
'Nearest Interpolation': nearest_interp}
# Visualize each interpolation
for ax, df_key in zip(axes, interpolations):
interpolations[df_key].Ozone.plot(color='red', marker='o',
linestyle='dotted', ax=ax)
airquality.Ozone.plot(title=df_key + ' - Ozone', marker='o', ax=ax)
Dealing with Missing Data in Python