I am trying to remove the duplicate strings in a list of strings under a column in a Pandas DataFrame.
For example; the list value of:
[btc, btc, btc]
Should be;
[btc]
I have tried multiple methods however, none seems to be working as I am unable access the string values in the list. Any help is much appreciated.
DataFrame:
dollar_sign followers_count \
0 [btc] 35946
1 [btc] 35946
2 [btc] 35946
3 [nav] 35946
4 [btc, btc, btc] 35946
Access the list of strings under a column
for row in df_twitter['dollar_sign']:
print row
Output:
[btc]
[btc]
[btc]
[nav]
[btc, btc, btc]