pandas remove char from column
df['result'] = df['result'].str.replace(r'D', '')
df
time result
1 09:00 52
2 10:00 62
3 11:00 44
4 12:00 30
5 13:00 110
pandas remove char from column
df['result'] = df['result'].str.replace(r'D', '')
df
time result
1 09:00 52
2 10:00 62
3 11:00 44
4 12:00 30
5 13:00 110
remove special characters from string python
import re
# only remove special charactors but not white spaces
re.sub('[^A-Za-z0-9]+ ', '', mystring)
# remove special charactors and white spaces as well
re.sub('[^A-Za-z0-9]+', '', mystring)
python remove special characters from list
import re
my_list= ["on@3", "two#", "thre%e"]
print [re.sub('[^a-zA-Z0-9]+', '', _) for _ in my_list]
remove special characters from string in python
''.join(i for i in string if i.isaplha()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us