I changed the Nan values by iterating through the columns and after that i get RecursionError when i try to view the dataframe
for i in df.columns:
df[i].fillna(df[i].mean, inplace=True)
df
Edit: Reproducible code
# import pandas and load cancer data
import pandas as pd
import numpy as np
df = pd.read_csv("cancer_data_means.csv")
# check which columns have missing values with info()
df.info()
# use means to fill in missing values
for i in df.columns:
df[i].fillna(df[i].mean, inplace=True)
# confirm your correction with info()
df.info()
df