Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import pandas as pd
def get_mutant_part_of_string(s):
return s.split()[1][-1]
df = pd.read_csv('/home/kyle/Downloads/uby_1ubq.tsv', sep='\t')
print df.head()
df.loc[:,'mut_aa'] = pd.Series(df['Mutation'].apply(get_mutant_part_of_string), index=df.index)
print df.head()
print df[ df.mut_aa == 'C' ].head()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.