Skip to content

Commit

Permalink
Set dtype of strain column in sequence index
Browse files Browse the repository at this point in the history
Sets the dtype of the strain column in the sequence index to "string"
prior to annotating metadata with that index. This change prevents
pandas from inferring the dtype as numeric when strain names are all
numeric.

Fixes #948
  • Loading branch information
huddlej committed May 25, 2022
1 parent 861840f commit c49a5a6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/annotate_metadata_with_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
index = pd.read_csv(
args.sequence_index,
sep="\t",
dtype={"strain": "string"}
).drop(
columns=["length"],
)
Expand Down

0 comments on commit c49a5a6

Please sign in to comment.