Filtering a CSV file in python
I have downloaded this csv file , which creates a spreadsheet of gene information. What is important is that in the HLA-* columns, there is gene information. If the gene is too low of a resolution e.g. DQB1*03 then the row should be deleted. If the data is too high resoltuion e.g. DQB1*03:02:01 , then the :01 tag at the end needs to be removed. So, ideally I want to proteins to be in the format DQB1*03:02 , so that it has two levels of resolution after DQB1* . How can I tell python to look for these formats, and ignore the data stored in them. e.g. if (csvCell is of format DQB1*03:02:01):