In [3]:
%matplotlib inline
import pandas as pd

df = pd.read_csv("../../../linux/git_demo_timestamp.csv", sep=";")
df.describe()


Out[3]:
timestamp_local author
count 723214 723213
unique 691746 17877
top 2017-11-01 03:56:19 Linus Torvalds
freq 137 24259

In [5]:
df.author.value_counts().head(10).plot(kind='pie', figsize=(8,8))


Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x26331d22518>

In [9]:
df['ts'] = pd.to_datetime(df.timestamp_local)
df.head()


Out[9]:
timestamp_local author timelocal_date ts
0 2017-12-31 14:47:43 Linus Torvalds 2017-12-31 14:47:43 2017-12-31 14:47:43
1 2017-12-31 13:13:56 Linus Torvalds 2017-12-31 13:13:56 2017-12-31 13:13:56
2 2017-12-31 13:03:05 Linus Torvalds 2017-12-31 13:03:05 2017-12-31 13:03:05
3 2017-12-31 12:30:34 Linus Torvalds 2017-12-31 12:30:34 2017-12-31 12:30:34
4 2017-12-31 12:29:02 Linus Torvalds 2017-12-31 12:29:02 2017-12-31 12:29:02

In [13]:
df.ts.dt.hour.value_counts(sort=False).plot(kind='bar')


Out[13]:
<matplotlib.axes._subplots.AxesSubplot at 0x26328e932b0>