Created
October 17, 2022 15:01
-
-
Save Abhayparashar31/7a893581b9307e7d0e622acdb41e8278 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def clean_data(data): | |
text = re.sub(r"\[[0-9]*\]"," ",data) | |
text = text.lower() | |
text = re.sub(r'\s+'," ",text) | |
text = re.sub(r","," ",text) | |
return text | |
cleaned_data = clean_data(raw_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment