def clean_data(data): # drop problematic row with zero for asthma_rate data = data.drop([141, 142, 149, 153, 158]) # replacing nans with zeros data_nas = data.fillna(0) # print('clean_data') # print(type(data_nas)) return data_nas
def clean_data(data): # drop problematic row with zero for asthma_rate data = data.drop([141, 142, 149, 153, 158]) data_nas = data.fillna(0) return data_nas
def fill_nans(data): data = data[data.asthma_rate != 0] data_nas = data.fillna(0) return data_nas