Skip to content

Instantly share code, notes, and snippets.

View FirasSadiyah's full-sized avatar
👨‍💻
Coding ⌨️ <> Decoding 🧬

Firas FirasSadiyah

👨‍💻
Coding ⌨️ <> Decoding 🧬
View GitHub Profile
@FirasSadiyah
FirasSadiyah / python-exception-handling.py
Last active February 25, 2024 12:17
python-exception-handling.py
import pandas as pd
class EmptyDataFrameException(Exception):
pass
# create a dataframe with some genome variants
vcf_df = pd.DataFrame({"chrom": ["chr1", "chr2", "chr3", "chr4"],
"start": [1000, 2000, 3000, 4000],
"end": [1010, 2010, 3010, 4010],
"ref": ["A", "C", "G", "T"],