Help filling in NaN in DF. Project: Cleaning US Census Data

I’m having trouble filling the NaN values in a Dataframe. There are 4 NaN values in the “Pacific” column of the census DF. Even after I run this code, the NaN values remain.

for race in census[["Hispanic", "White", "Black", "Native", "Asian" , "Pacific"]]:
    for value in census[race]:
        replace = census[race].replace("\%", "", regex = True)
    census[race]= pd.to_numeric(replace)

  value = {
    "Pacific": 100 - census["Hispanic"] - census["White"] - census["Black"] - census["Native"] - census["Asian"]

My function needed inplace=True. code works now :slight_smile: