May-05-2017, 04:56 PM
Hello! My "Python quest" continues and I am seeking your help with the following task.
So, I have a data frame of 3199 rows with a string -text- column, e.g.:
I tried split and regex, but failed to run it successfully. Thank you in advance for help.
So, I have a data frame of 3199 rows with a string -text- column, e.g.:
df['text'].iloc[2001]
Output:I miss biz!#ThingsYouDontWannaHearBeforeAKiss "Hope you like bacon and corn"@martensmi Love it. Jack and I r watching as wellYour compliments mean more than anyone else\'s.@DaveAbberger @markholston prince NEEDED to go... .196 in the postseason with like 3RBI\'s?!?! So glad he\'s gone... Now we need Inge back :)On this damn damnI\'m at Jimmys\' Lounge (Hazen, ND) http://t.co/ciYHl8J3x2I don\'t wanna fall in love to think about the future. I wanna fall in love and have fun because I\'m young and I deserve fun ya knowMy 2nd home? (@ Krause\'s SuperValu) http://t.co/4atauDdqfqVery blessed to say I have my first varsity start under my belt. Thanks to everyone who has supported me throughout the years.Pool pilates! (@ Hazen Swimming Pool) [pic]: http://t.co/zY9DIU6HHo"There are two tragedies in life, one is to lose your hearts desire, the other is to gain it." -George Bernard ShawI jus want this week to be over....@JeffGordonWeb WINS AT @MartinsvilleSwy YUSSS!!!!! #NASCAR
What code should I use in order to delete (1) Twitter handles -- i.e., words that start with "@", and (2) links that start with "http://"? I tried split and regex, but failed to run it successfully. Thank you in advance for help.