Skip to content

Instantly share code, notes, and snippets.

@nickodell
Created October 29, 2022 19:03
Show Gist options
  • Save nickodell/23c59a5bbf2a4ae3569b383b7c999616 to your computer and use it in GitHub Desktop.
Save nickodell/23c59a5bbf2a4ae3569b383b7c999616 to your computer and use it in GitHub Desktop.
concatenated = data[['day', 'month', 'year', 'time']].astype(str).agg(' '.join, axis=1)
data['date'] = pd.to_datetime(concatenated)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment