Skip to content

Instantly share code, notes, and snippets.

@cordon-thiago
Created December 1, 2019 21:35
Show Gist options
  • Save cordon-thiago/bf59bc651cc4bae0be97e7f830111ace to your computer and use it in GitHub Desktop.
Save cordon-thiago/bf59bc651cc4bae0be97e7f830111ace to your computer and use it in GitHub Desktop.
Datatype Conversion
import pandas as pd
hardbounce_2['flgHardBounce_n'] = hardbounce_2.flgHardBounce.astype(int)
hardbounce_2['regDate_n'] = pd.to_datetime(hardbounce_2['regDate'])
hardbounce_2['birthDate_n'] = pd.to_datetime(hardbounce_2['birthDate'], errors = 'coerce')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment