I want to write a definition that take in a string (a tweet) and creates a 2 column dataframe with hashtags in 1 column and @ mentions on the other one.
I am using split right now, but would like something like:
(psedocode)
string.split("@"||"#", if "#" assign to column1 else column2)
I know in R you can do something similar with "which", but dont know how to do it here.
Thanks
PS. I have the dataset with all the tweets downloaded in a txt file.