Detecting missing values
Required packages
pip install pandas matplotlib seabornLoading the data
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
df = pd.read_excel("Matrix_missing_values_EXAMPLE.xlsx", decimal=",")
df.set_index("Sample Name", inplace=True)plt.figure(figsize=(24, 30)) # Modify the width and height as needed
sns.heatmap(df.isnull(), cbar=False)
plt.savefig("missing_values_heatmap.png", dpi=200, bbox_inches='tight')
plt.show()


PreviousReplacing NAs via random forest (RF) model (randomForest library)NextFiltering out columns containing mostly NAs
Last updated