Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
JOSSOUD Olivier
CFA Tools
Commits
f25d4f14
Commit
f25d4f14
authored
Apr 15, 2022
by
JOSSOUD Olivier
Browse files
Flow. get_flask_content()
parent
5b3fc747
Pipeline
#172114
failed with stage
in 1 minute and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
cfatools/processor/flow.py
cfatools/processor/flow.py
+21
-0
No files found.
cfatools/processor/flow.py
View file @
f25d4f14
...
...
@@ -493,6 +493,27 @@ def add_flask_info(arrival_df: pd.DataFrame, collector_df: pd.DataFrame) -> pd.D
return
arrival_df
def
get_flask_content
(
arrival_df
:
pd
.
DataFrame
)
->
pd
.
DataFrame
:
"""Get the content of each flask identified in the input DataFrame
Parameters
----------
arrival_df: pd.DataFrame
Output of :func:`get_arrival_df` function, followed by :func:`add_iceblock_info`, :func:`add_melted_height` and
:func:`add_flask_info` function.
Returns
-------
pd.DataFrame
DataFrame with the iceblock's height range contained in each flask.
"""
flask_df
=
arrival_df
[[
"flask"
,
"icbk_code"
,
"melted_height_icbk"
]].
groupby
(
[
"flask"
,
"icbk_code"
,
"icbk_name"
]).
agg
([
min
,
max
])
flask_df
=
flask_df
.
droplevel
(
0
,
axis
=
1
)
flask_df
=
flask_df
.
reset_index
()
return
flask_df
def
get_conduct_by_melt_time
(
arrival_df
:
pd
.
DataFrame
,
conduct_df
:
pd
.
DataFrame
,
probes
:
list
=
[
"C1"
,
"C2"
,
"C3"
,
"C4"
,
"C5"
],
reference_datetime
:
str
=
None
,
...
...
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