In [1]:
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
%matplotlib inline
matplotlib.style.use('ggplot')
In [2]:
#plot_df = pandas.DataFrame({
# 'col1': [1, 3, 2, 4],
# 'col2': [3, 6, 5, 1],
# 'col3': [4, 7, 6, 2],
#})
mongo_df = pd.read_csv('./mongo.csv',header=0,index_col=0)
mysql_df = pd.read_csv('./mysql.csv',header=0,index_col=0)
In [3]:
mongo_df
Out[3]:
In [4]:
mysql_df
Out[4]:
In [5]:
# Cambio los nombres de las columnas para identificar cada dato y copio el index de mysql,
# porque el CSV de mongo no lleva el nombre de las querys.
mongo_df.columns=["MongoDB"]
mysql_df.columns=["MySQL"]
mongo_df.index = mysql_df.index
mongo_df
Out[5]:
In [6]:
final_df = pd.concat([mysql_df,mongo_df],axis=1)
final_df
Out[6]:
In [7]:
final_df.plot(kind='bar').set(ylabel='ms')
Out[7]:
In [8]:
final_df.plot(logy=True,kind='bar',figsize=(15,15*3/4)).set(ylabel='ms')
Out[8]: