Commit ab9db2ae authored by Samarth Joshi's avatar Samarth Joshi

Adding getopt to take input csv from args

parent e195f1c4
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import getopt
import csv
import sys
filename = ''
df = pd.read_csv("data.csv")
try:
opts, args = getopt.getopt(sys.argv[1:], "", ["data="])
for arg, val in opts:
if arg == '--data':
filename = val
except:
print('Invalid options specified')
exit(1)
if not filename:
print('Invalid file specified')
exit()
df = pd.read_csv(filename)
count=1
for instance_id, grp1 in df.groupby(['instance']):
if instance_id == 'instance-1' or True:
#if instance_id == 'instance-1':
if True:
plt.figure(count)
count = count + 1
for algorithm, grp2 in grp1.groupby(['algorithm', 'epsilon']):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment