Skip to content

Commit

Permalink
Merge branch 'feat/inspect-prob' into 'main'
Browse files Browse the repository at this point in the history
Added probability to inspect source

See merge request ddatdatascienceteam/company-matching!33
  • Loading branch information
Will Langdale committed Apr 8, 2024
2 parents 9d45416 + 08868f3 commit 42ca664
Show file tree
Hide file tree
Showing 2 changed files with 265 additions and 8 deletions.
7 changes: 5 additions & 2 deletions cmf/data/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,11 @@ def inspect_with_source(
"""Enriches the results with the source data."""
df = (
self.to_df()
.filter(["left_id", "right_id"])
.map(str)
.filter(["left_id", "right_id", "probability"])
.assign(
left_id=lambda d: d.left_id.apply(str),
right_id=lambda d: d.right_id.apply(str),
)
.merge(
left_data.assign(**{left_key: lambda d: d[left_key].apply(str)}),
how="left",
Expand Down
Loading

0 comments on commit 42ca664

Please sign in to comment.