for i in df['locality_name_no_type'].unique():
median= df.loc[df['locality_name_no_type'] == i, 'ceiling_height'].median()
df.loc[ (df['locality_name_no_type'] == i) & (df['ceiling_height'].isna()), 'ceiling_height'] = median
df['ceiling_height'].isna().sum()
Re: Untitled
From Voluminous Hog, 1 Year ago, written in Python, viewed 230 times.
This paste is a reply to Untitled from Marsel Galiev
- go back
URL http://codebin.org/view/f2f028da/diff
Embed
Viewing differences between Untitled and Re: Untitled
— Expand Paste to full width of browser