In [1]:
import numpy as np
import pandas as pd
import pylab as pl
import matplotlib.pyplot as plt
%matplotlib inline
df = pd.read_csv('tmp/session_d.csv')
In [2]:
df.dtypes
Out[2]:
In [5]:
pl.figure(figsize=(12, 6))
p=df.groupby('Elapsed Time (sec)')['Elapsed Time (sec)'].count().plot.bar(width=2,edgecolor='blue',color='blue')
p.tick_params(labelbottom='off',top='off',bottom='off')
p.set_yscale('log')
fig = p.get_figure()
fig.savefig('tmp/ElapsedTime000.png')
In [6]:
df['ElapsedTime2']=np.floor(df['Elapsed Time (sec)']/10)*10+10
pl.figure(figsize=(12, 6))
p=df.groupby('ElapsedTime2')['ElapsedTime2'].count().plot.bar(width=2,edgecolor='blue',color='blue')
p.tick_params(labelbottom='off',top='off',bottom='off')
p.set_yscale('log')
fig = p.get_figure()
fig.savefig('tmp/ElapsedTime001.png')
In [7]:
df['ElapsedTime3']=np.floor(df['Elapsed Time (sec)']/100)*100+100
pl.figure(figsize=(12, 6))
p=df.groupby('ElapsedTime3')['ElapsedTime3'].count().plot.bar(width=2,edgecolor='blue',color='blue')
p.tick_params(labelbottom='off',top='off',bottom='off')
p.set_yscale('log')
fig = p.get_figure()
fig.savefig('tmp/ElapsedTime002.png')
In [8]:
df.to_csv('tmp/session_e.csv')
In [ ]: