I have a dataframe, with data in each row as such.
How can I process the sequence strings in each row, such that the format will be as such?
[M, K, E, Y, G, E, D, L, K]
get_seq_str = ','.join(test_df.loc['seq_1']) arr.append(get_seq_str)
However, when I append it to the dataframe, there is a single quotation mark at the start and end of each string, which I do not want.
['M, K, E, Y, G, E, D, L, K']
How can I strip the single quotation marks?
IIUC, you can try
list to string value
df['col_list'] = df['col'].apply(list)
print(df) col col_list 0 MKEYGEDLK [M, K, E, Y, G, E, D, L, K]