Skip to content

Commit

Permalink
Strip p0 from all values (#447)
Browse files Browse the repository at this point in the history
Fix p0 management.
  • Loading branch information
tsalo authored Feb 28, 2025
1 parent ebd46c3 commit b172dd3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cubids/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1001,9 +1001,10 @@ def assign_variants(summary, rename_cols):
# If the value is an actual float
elif isinstance(val, float):
val = str(val).replace(".", "p")
if val.endswith("p0"):
# Remove the trailing "p0"
val = val[:-2]

if val.endswith("p0"):
# Remove the trailing "p0"
val = val[:-2]

# Filter out non-alphanumeric characters
val = re.sub(r"[^a-zA-Z0-9]", "", val)
Expand Down

0 comments on commit b172dd3

Please sign in to comment.