Skip to content

Instantly share code, notes, and snippets.

@lmiller1990
Created August 23, 2018 14:06
Show Gist options
  • Save lmiller1990/64a2b3b36fbd599c4a4f829fd37da753 to your computer and use it in GitHub Desktop.
Save lmiller1990/64a2b3b36fbd599c4a4f829fd37da753 to your computer and use it in GitHub Desktop.
def load_and_clean_data():
df = pd.read_csv("data.csv")
df.team = df.team.str.lower()
df.league = df.league.str.lower()
return df.replace({ "1": 1.0, "0": 0.0, 1: 1.0, 0: 0.0, 'Blue': -1, 'Red': 1.0 })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment