Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def income_nan(row):
- days = row['days_employed']
- type = row['income_type']
- if days == pd.isna:
- if type == 'сотрудник':
- return retired_mean
- else:
- if days == pd.isna:
- if type == 'безработный':
- return unemployed_mean
- data['days_employed_new'] = data.apply(income_nan, axis=1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement