Skip to content

Instantly share code, notes, and snippets.

@GurjotSinghMahi
Created February 18, 2021 14:36
Show Gist options
  • Save GurjotSinghMahi/1841db12746ad026dc9ed6a6bb365a67 to your computer and use it in GitHub Desktop.
Save GurjotSinghMahi/1841db12746ad026dc9ed6a6bb365a67 to your computer and use it in GitHub Desktop.
# read the csv file and parse the dates
df = pd.read_csv("raw_data.csv", parse_dates=['SubmissionDate', 'starttime', 'endtime'])
# Remove Date from SubmissionDate Column
df['Time'] = pd.to_datetime(df['SubmissionDate']).dt.time
print(tabulate(df[['Time', 'SubmissionDate']], headers = 'keys', tablefmt = 'psql'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment