Last active
March 27, 2021 07:06
-
-
Save AyishaR/19d3d56da11ed0b5f8fbb2c89d6635bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df = df.sort_values('gas_type') | |
temp_inside = [] | |
for t in df['gas_type'].unique(): | |
temp_inside.extend(df[df['gas_type']==t]['temp_inside'].fillna(df[df['gas_type']==t]['temp_inside'].mode()[0])) | |
df['temp_inside'] = temp_inside | |
df['refill liters'] = df['refill liters'].fillna('0') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment