Skip to content

Instantly share code, notes, and snippets.

@drigols
Created September 18, 2020 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drigols/ead6b1c6e87755d5130655a85d74fea4 to your computer and use it in GitHub Desktop.
Save drigols/ead6b1c6e87755d5130655a85d74fea4 to your computer and use it in GitHub Desktop.
import pandas as pd
pd.set_option('display.max_columns', 18)
data = pd.read_csv('../datasets/athlete_events.csv')
data['Height'] = data['Height'].fillna(data['Height'].mean())
data['Weight'] = data['Weight'].fillna(data['Weight'].mean())
print(data[['Height', 'Weight']].head(20))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment