I have a folder having multiple CSV files. Each file has 3 columns ('real','user','sys')each column has 10 time values(float) in the rows.My target is to read these csv files from the folder and make a box-whisker graph to compare the values of each csv file. I wrote the following python code and it gives me multiple(equal to the number of files) separate graphs. By removing plt.show() out of the loop only last graph is displayed.
I want these graphs to be merged in one graph and each file name to be the labels defining which box-whisker is for which file. Kindly help.
import csv
import numpy as np
import pandas
import matplotlib.pyplot as plt
import glob
files = glob.glob ('/Users/Desktop/sample/*.csv')
print files
for file in files:
df = pandas.read_csv(file, sep=',')
LABELS = ["real", "user", "sys"]
plt.title('Time Taken by Classifier')
plt.xlabel('Time_Types')
plt.ylabel('Time_Value in (sec)')
df.boxplot()
plt.show()