Skip to content

Commit

Permalink
replaced npnan with pdNA to reduce dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
VinzentRisch committed Sep 12, 2024
1 parent fc84e42 commit a68b249
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions rescript/bv_brc.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from typing import Union
from urllib.parse import quote

import numpy as np
import qiime2
import pandas as pd
import requests
Expand Down Expand Up @@ -50,10 +49,9 @@ def get_bv_brc_metadata(
metadata.index = metadata.index.astype(str)

# Replace empty values and values consisting of spaces only with np.nan
metadata.replace(to_replace=r'^\s*$', value=np.nan, regex=True,
metadata.replace(to_replace=r'^\s*$', value=pd.NA, regex=True,
inplace=True)
metadata.replace([None], np.nan, inplace=True)

metadata.replace([None], pd.NA, inplace=True)
return qiime2.Metadata(metadata)


Expand Down

0 comments on commit a68b249

Please sign in to comment.