Skip to content

Commit

Permalink
round pct to 2dp
Browse files Browse the repository at this point in the history
  • Loading branch information
sophie22 committed May 7, 2022
1 parent 2309dbc commit f41dbd2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion genes_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,6 @@ def genePCTcovered(df):
gene_coverage_df = pd.DataFrame.from_dict(gene_coverage_dict,
orient='index', columns=["chromosome", "startPos",
"endPos", "GeneSymbol", "Accession", "genePercentage"])
print(gene_coverage_df)
# Round percentage values to 2 dp
gene_coverage_df["genePercentage"] = gene_coverage_df["genePercentage"].round(2)
print(gene_coverage_df)

0 comments on commit f41dbd2

Please sign in to comment.