Skip to content

Instantly share code, notes, and snippets.

@jjsantanna
Created March 13, 2018 14:30
Show Gist options
  • Save jjsantanna/d32ba1fed7bac91124bfac4263a83587 to your computer and use it in GitHub Desktop.
Save jjsantanna/d32ba1fed7bac91124bfac4263a83587 to your computer and use it in GitHub Desktop.
datetime 2 timestamp
def datetime_converter(text):
try:
return pd.to_datetime(text,format='%Y-%m-%d %H:%M:%S')
except AttributeError:
return text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment