Skip to content

Instantly share code, notes, and snippets.

@david-a-parry
david-a-parry / date2gene.py
Last active August 14, 2021 04:33
Example to convert excel corrupted human gene names back from dates to gene symbols
#!/usr/bin/env python3
import os
import warnings
import re
import pandas as pd
date_re = re.compile(r'\d{4}-\d{2}-\d{2}')
mnth2str = {3: 'MARCH', 9: 'SEPT', 10: 'OCT', 12: 'DEC'}