I want to remove hashtag symbol ('#'
) and underscore that separate between words ('_'
)
Example: "this tweet is example #key1_key2_key3"
the result I want: "this tweet is example key1 key2 key3"
My code using string :
#Remove punctuation , # Hashtag Symbol
translate_table = dict((ord(char), None) for char in string.punctuation)
cleaned_combined_tweets.translate(translate_table)
which gives the result: "this tweet is example key1key2key3"
>>> "this tweet is example #key1_key2_key3".replace("#", "").replace("_", " ")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With