I have this column of data in a DataFrame
(just shown here in a CSV
file):
What I am trying to do is extract all the data within the brackets and also include the brackets so each row looks something like this
[GO:0005524],[GO:0000287],[GO:0004709],[GO:0004674],etc...
This is the code I have so far but I always end up with a blank column:
df['go_molecular_function'] = df['go_molecular_function'].str.extract(r"\((A-Za-z+)\)", expand=False)