Skip to content

Instantly share code, notes, and snippets.

@davisvictorns
Last active October 21, 2020 02:37
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 davisvictorns/9f16467e6b53a797e4caa171cd27f31d to your computer and use it in GitHub Desktop.
Save davisvictorns/9f16467e6b53a797e4caa171cd27f31d to your computer and use it in GitHub Desktop.
9
#excluding unecessary columns
premier_league_all.drop(["League", "Table Type", "KEY"], axis=1, inplace=True)
#renaming columns
premier_league_all.columns = ["position", "team", "games_played", "wins", "draws", "losts", "goals_for", "goals_against", "goals_difference", "points", "season"]
#transforming some columns to 'int64' type
premier_league_all = premier_league_all.astype({'position': 'int64', 'wins': 'int64', 'draws': 'int64', 'losts': 'int64'})
premier_league_all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment