Re: Untitled

From Soiled Ibis, 1 Year ago, written in Plain Text, viewed 317 times. This paste is a reply to Untitled from Anorexic Agouti - view diff
URL http://codebin.org/view/94d52cc5 Embed
Download Paste or View Raw
  1. games = games.dropna(subset=['name'])
  2. games['year_of_release'].unique() #проверяем что в пропущщеных только Nan
  3. games['year_of_release'] = games['year_of_release'].fillna('unknown')
  4. games['genre'].unique()
  5. games['genre'] = games['genre'].fillna('unknown') #здесь удалил безымянные и заполнил 'unknown' те где жанр отсутствует
  6. __________________________________________________________________________________________________
  7.  
  8. #По оценкам критиков
  9. games['critic_score'].unique()
  10. for p in games['platform'].unique():
  11.     games.loc[(games['platform'] == p) & (games['critic_score'].isna()), 'critic_score'] = \
  12.     games.loc[(games['platform'] == p),'critic_score'].mean()
  13. games.isna().sum()
  14.  
  15. _____________________________________________________________________________________________________
  16. #По оценкам юзеров:
  17. #for p in games['platform'].unique():
  18.     #games.loc[(games['platform'] == p) & (games['user_score'].isna()), 'user_score'] =\
  19.     #games.loc[(games['platform'] == p), 'user_score'].mean()
  20. #games.isna().sum()

Replies to Re: Untitled rss

Title Name Language When
Re: Re: Untitled Fiery Parakeet text 1 Year ago.

Reply to "Re: Untitled"

Here you can reply to the paste above