Skip to content

Commit

Permalink
fix: rename for variable standards
Browse files Browse the repository at this point in the history
  • Loading branch information
kmaphoenix committed Sep 30, 2024
1 parent 5221fa0 commit 4e3c1c5
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/dfcx_scrapi/core/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,22 +650,26 @@ def _unpack_match(self, df: pd.DataFrame):
.assign(
match_type = lambda df: df.match.apply(
# pylint: disable=W0212
lambda m: m.match_type._name_ if m else ""
lambda match_value: match_value.match_type._name_
if match_value else ""
),
confidence = lambda df: df.match.apply(
lambda m: m.confidence if m else ""
lambda match_value: match_value.confidence
if match_value else ""
),
parameters_set = lambda df: df.match.apply(
lambda m: m.parameters if m else ""
lambda match_value: match_value.parameters
if match_value else ""
),
detected_intent = lambda df: df.match.apply(
lambda m: m.intent.display_name if m else ""
lambda match_value: match_value.intent.display_name
if match_value else ""
)
)
.assign(
parameters_set = lambda df: df.parameters_set.apply(
lambda p: self.recurse_proto_marshal_to_dict(
p) if p else "")
lambda parameter: self.recurse_proto_marshal_to_dict(
parameter) if parameter else "")
)
.drop(columns="match")
)

0 comments on commit 4e3c1c5

Please sign in to comment.