Skip to content

Instantly share code, notes, and snippets.

@Nithilaa
Last active July 26, 2021 04:36
Show Gist options
  • Save Nithilaa/a01eb84b8c207d20e7b52c759f8ab90d to your computer and use it in GitHub Desktop.
Save Nithilaa/a01eb84b8c207d20e7b52c759f8ab90d to your computer and use it in GitHub Desktop.
converting the Flag column from categorical data type to numeric type
df1['Flag'] = df1['Flag'].map({0: '0', 1: '1'})
df1.head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment