Skip to content

Commit

Permalink
Fixed check in transform that was causing tests to fail
Browse files Browse the repository at this point in the history
  • Loading branch information
jaclynbeck-sage committed Aug 23, 2024
1 parent 9136b1f commit 5a7ef08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/agoradatatools/etl/transform/proteomics.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def transform_proteomics(df: pd.DataFrame) -> pd.DataFrame:
pd.DataFrame: a DataFrame that is identical to the input DataFrame but with rows containing
"CON__" in the uniqid removed.
"""
# Checking for "is False" has the benefit of removing rows with NA uniqid values as well,
# as contains() returns NA for those values.
df = df[df["uniqid"].str.contains("CON__") is False]
# Using "na=True" causes rows with NA uniqids to be set to True so they get removed
remove_rows = df["uniqid"].str.contains("CON__", na=True)
df = df.drop(df.index[remove_rows])
return df

0 comments on commit 5a7ef08

Please sign in to comment.