python Programming Glossary: rowfields
Filtering a CSV file in python http://stackoverflow.com/questions/13713752/filtering-a-csv-file-in-python in csvdictreader.fieldnames if name.startswith 'HLA D' for rowfields in csvdictreader keep True for field in targets value rowfields.. in csvdictreader keep True for field in targets value rowfields field if re.match r'^ w d d ' value keep False break # quit.. target fields elif re.match r'^ w d d d d ' value rowfields field re.sub r'^ w d d d d ' r' 1 2 3' value else # reduce gene..
|