Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SGS18-READEX
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Ondrej Vysocky
SGS18-READEX
Commits
be92fde1
Commit
be92fde1
authored
6 years ago
by
Ivo Peterek
Browse files
Options
Downloads
Patches
Plain Diff
FIX: csv name now takes key as parameter
#5
parent
cd299c29
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/csv_vals_edit.py
+15
-2
15 additions, 2 deletions
src/csv_vals_edit.py
with
15 additions
and
2 deletions
src/csv_vals_edit.py
+
15
−
2
View file @
be92fde1
...
...
@@ -43,6 +43,13 @@ class csv_vals_edit_window(QtWidgets.QDialog, design_csv_vals_edit.Ui_csv_vals_e
xLabel_multiplier
=
config_dic
[
'
x_val_multiplier
'
]
funcLabel_multiplier
=
config_dic
[
'
label_val_multiplier
'
]
if
keys
:
keyInd
=
[
i
for
i
,
x
in
enumerate
(
config_dic
[
'
file_name_args_tup
'
])
if
'
key
'
in
x
]
keyVal
=
[]
for
key
in
keys
:
key
=
key
.
split
(
'
;
'
)[
0
]
keyVal
.
append
(
key
)
data_path
=
config_dic
[
'
root_folder
'
][
0
][
0
]
+
"
/
"
+
region
csv_names
=
glob
.
glob
(
data_path
+
'
/*.csv
'
)
first_csv_path
=
csv_names
[
0
]
...
...
@@ -50,12 +57,18 @@ class csv_vals_edit_window(QtWidgets.QDialog, design_csv_vals_edit.Ui_csv_vals_e
target_csv_name
=
first_csv_name
target_csv_name
[
xLabelInd
[
0
]]
=
str
(
int
(
round
(
float
(
xLabelVal
)
/
xLabel_multiplier
)))
target_csv_name
[
funcLabelInd
[
0
]]
=
str
(
int
(
round
(
float
(
funcLabelVal
)
/
funcLabel_multiplier
)))
for
i
,
index
in
enumerate
(
keyInd
):
target_csv_name
[
index
]
=
keyVal
[
i
]
#all config parameters
for
i
in
range
(
len
(
target_csv_name
)):
if
not
i
in
keyInd
and
i
is
not
funcLabelInd
[
0
]
and
i
is
not
xLabelInd
[
0
]:
target_csv_name
[
i
]
=
'
*
'
target_csv_name
=
(
'
_
'
).
join
(
target_csv_name
)
+
"
.csv
"
self
.
target_csv_path
=
data_path
+
'
/
'
+
target_csv_name
self
.
target_csv_path
=
glob
.
glob
(
data_path
+
'
/
'
+
target_csv_name
)
vals_ind
=
[]
vals
=
[]
with
open
(
self
.
target_csv_path
)
as
csvfile
:
with
open
(
self
.
target_csv_path
[
0
]
)
as
csvfile
:
reader
=
csv
.
reader
(
csvfile
,
delimiter
=
'
,
'
)
yLabel_category
=
False
self
.
all_csv_lines
=
[]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment