Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
concepts-processing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
meldb
concepts-processing
Commits
0a627e67
Commit
0a627e67
authored
3 months ago
by
Jakub Dylag
Browse files
Options
Downloads
Patches
Plain Diff
Allow multiple files per concept set - update map function
parent
a6636f57
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
acmc/phen.py
+7
-7
7 additions, 7 deletions
acmc/phen.py
with
7 additions
and
7 deletions
acmc/phen.py
+
7
−
7
View file @
0a627e67
...
...
@@ -593,12 +593,12 @@ def _process_actions(df: pd.DataFrame, concept_set: dict) -> pd.DataFrame:
# Perform Structural Changes to file before preprocessing
_logger
.
debug
(
"
Processing file structural actions
"
)
if
(
"
actions
"
in
concept_set
[
"
file
"
]
and
"
split_col
"
in
concept_set
[
"
file
"
][
"
actions
"
]
and
"
codes_col
"
in
concept_set
[
"
file
"
][
"
actions
"
]
"
actions
"
in
concept_set
and
"
split_col
"
in
concept_set
[
"
actions
"
]
and
"
codes_col
"
in
concept_set
[
"
actions
"
]
):
split_col
=
concept_set
[
"
file
"
][
"
actions
"
][
"
split_col
"
]
codes_col
=
concept_set
[
"
file
"
][
"
actions
"
][
"
codes_col
"
]
split_col
=
concept_set
[
"
actions
"
][
"
split_col
"
]
codes_col
=
concept_set
[
"
actions
"
][
"
codes_col
"
]
_logger
.
debug
(
"
Action: Splitting
"
,
split_col
,
...
...
@@ -626,12 +626,12 @@ def _preprocess_source_concepts(
# Preprocess codes
code_types
=
parse
.
CodeTypeParser
().
code_types
for
code_type
in
concept_set
[
"
file
"
][
"
columns
"
]:
for
code_type
in
concept_set
[
"
columns
"
]:
parser
=
code_types
[
code_type
]
_logger
.
info
(
f
"
Processing
{
code_type
}
codes for
{
code_file_path
}
"
)
# get codes by column name
source_col_name
=
concept_set
[
"
file
"
][
"
columns
"
][
code_type
]
source_col_name
=
concept_set
[
"
columns
"
][
code_type
]
codes
=
df
[
source_col_name
].
dropna
()
codes
=
codes
.
astype
(
str
)
# convert to string
codes
=
codes
.
str
.
strip
()
# remove excess spaces
...
...
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