Skip to content

Instantly share code, notes, and snippets.

@GurjotSinghMahi
Created February 18, 2021 13:34
Show Gist options
  • Save GurjotSinghMahi/bd081dbdb32c18323d0c2da7990d4435 to your computer and use it in GitHub Desktop.
Save GurjotSinghMahi/bd081dbdb32c18323d0c2da7990d4435 to your computer and use it in GitHub Desktop.
# Set start and end date
start_date = '2020-12-04'
end_date = '2020-12-07'
# Define datatype
df['Date'] = (df['Date']).astype('datetime64[D]')
#select only particular date data
df = df.loc[((df['Date'] >= start_date) & (df['Date'] <= end_date))]
# Print the dataframe
print(tabulate(df[['SubmissionDate', 'user_id', 'gadget']], headers = 'keys', tablefmt = 'psql'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment