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 Aug 5, 2022
1 parent 01a0dd2 commit 38b4d52
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 38b4d52

Please sign in to comment.