df = pd.read_csv('https://raw.githubusercontent.com/selva86/datasets/master/Cars93_miss.csv')
d = {'Min.Price': np.nanmean, 'Max.Price': np.nanmedian}
df[['Min.Price', 'Max.Price']] = df[['Min.Price', 'Max.Price']].apply(lambda x, d: x.fillna(d[x.name](x)), args=(d, ))
apply(lambda x, d: x.fillna(d[x.name](x)), args=(d, )) - Am not understanding this part. I know how apply and fillna works but with this args it's confusing.
- why does args have comma at the end
- what does the d actually pass -