Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
HOTMapper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
HOTMapper
HOTMapper
Commits
c44d1abd
Commit
c44d1abd
authored
5 years ago
by
jvfpw18
Browse files
Options
Downloads
Patches
Plain Diff
Fix insertion when two columns are based in the same header
parent
9266139f
No related branches found
Branches containing commit
No related tags found
2 merge requests
!13
v1.1.0
,
!10
Fix insertion when two columns are based in the same header
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
database/protocol.py
+11
-1
11 additions, 1 deletion
database/protocol.py
with
11 additions
and
1 deletion
database/protocol.py
+
11
−
1
View file @
c44d1abd
...
...
@@ -74,9 +74,19 @@ class Protocol(object):
if
not
indexes
:
return
None
if
len
(
indexes
)
>
1
:
return
None
self
.
resolve_duplicates
(
year
,
indexes
)
return
self
.
_remaped
[
indexes
[
0
]]
def
resolve_duplicates
(
self
,
year
,
indexes
):
'''
Transforms a dbcolumn that gets the data from the same header to a denormalization of the first column.
'''
original_dbcolumn
=
self
.
dbcolumn_from_target
(
self
.
_remaped
[
indexes
[
0
]])[
0
]
for
i
in
range
(
1
,
len
(
indexes
)):
self
.
_dataframe
.
loc
[
indexes
[
i
],
year
]
=
'
~
'
+
original_dbcolumn
def
original_from_target
(
self
,
name
,
year
):
'''
Gets original column from target column and a year
Input example: **{
'
name
'
:
'
CEBMA015N0
'
,
'
year
'
:
'
2015
'
}
...
...
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