Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
measprocess
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lukas Eller
measprocess
Commits
d02620de
Commit
d02620de
authored
Mar 26, 2021
by
Lukas Eller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed unnecessary creation of new dataframe
parent
6f9205a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
preprocess.py
measprocess/preprocess.py
+4
-4
setup.py
setup.py
+1
-1
No files found.
measprocess/preprocess.py
View file @
d02620de
...
...
@@ -24,7 +24,7 @@ def link_dataframes(A: pd.DataFrame, B: pd.DataFrame, ref_col: str, metric=None,
metric
=
lambda
a
,
b
:
(
a
-
b
)
.
abs
()
indices
,
deviations
=
[],
[]
for
_
,
element
in
tqdm
(
A
.
iterrows
(),
total
=
A
.
shape
[
0
],
disable
=
(
not
verbose
),
desc
=
"Linking Dataframes"
):
for
_
,
element
in
tqdm
(
A
.
iterrows
(),
total
=
A
.
shape
[
0
],
disable
=
(
not
verbose
),
leave
=
False
,
desc
=
"Linking Dataframes"
):
distances
=
metric
(
element
[
ref_col
],
B
[
ref_col
]
...
...
@@ -37,9 +37,9 @@ def link_dataframes(A: pd.DataFrame, B: pd.DataFrame, ref_col: str, metric=None,
distances
.
argmin
()
)
B_with_duplicates
=
pd
.
DataFrame
(
tqdm
((
B
.
iloc
[
index
]
for
index
in
indices
),
total
=
len
(
indices
),
disable
=
(
not
verbose
),
desc
=
"Building combined DataFrame"
)
)
#Surpress irrelevant error warning regarding assigment
pd
.
options
.
mode
.
chained_assignment
=
None
B_with_duplicates
=
B
.
iloc
[
indices
]
B_with_duplicates
.
columns
=
B
.
columns
B_with_duplicates
.
index
=
A
.
index
...
...
setup.py
View file @
d02620de
...
...
@@ -10,7 +10,7 @@ README = (HERE / "README.md").read_text()
# This call to setup() does all the work
setup
(
name
=
"measprocess"
,
version
=
"0.5.1
0
"
,
version
=
"0.5.1
1
"
,
description
=
"Collection of measurement processing tools"
,
long_description
=
README
,
long_description_content_type
=
"text/markdown"
,
...
...
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