Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SpartanBotsOutlab67
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Roshan Rabinarayan
SpartanBotsOutlab67
Commits
ab9db2ae
Commit
ab9db2ae
authored
Oct 03, 2020
by
Samarth Joshi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding getopt to take input csv from args
parent
e195f1c4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
q5/q5.py
q5/q5.py
+19
-2
No files found.
q5/q5.py
View file @
ab9db2ae
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'
]):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment