Skip to content

Instantly share code, notes, and snippets.

@yusufshalaby
Last active March 19, 2019 14:53
Show Gist options
  • Save yusufshalaby/72a63d24df329902e5aca8577843a637 to your computer and use it in GitHub Desktop.
Save yusufshalaby/72a63d24df329902e5aca8577843a637 to your computer and use it in GitHub Desktop.
import pandas as pd
import csv
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv('hackathon_20190318120451.csv',delimiter=',',header=0,encoding='utf-8')
df['ProcDateTime'] = pd.to_datetime(df['TrxDateTime'], format='%m/%d/%Y %I:%M:%S %p')
plt.close('all')
plt.figure(figsize=(4,3), dpi=140)
sns.distplot(df.groupby('FareCardId').size().sort_values(ascending=False))
plt.xlabel('Number of taps')
plt.ylabel('Percent of population')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment