Reputation: 21
I am trying to remove commas from this "Client_name" dataframe, but I'm not sure how to? I'm reading you can use regex, but I don't understand how.
I basically need to remove all of the commas from this data frame. so I just have plain text to work with
Upvotes: 0
Views: 39
Reputation: 23217
Try str.replace()
, as follows:
data['Client_name'] = data['Client_name'].str.replace(',', '')
Upvotes: 1
Reputation: 29362
Well you can use replace()
method available in Python, let say's you have a string like ansdf,jksd,iou,klk,kkkkk
. so basically a sample code looks like this :-
Sample code:
s = 'ansdf,jksd,iou,klk,kkkkk'
a = s.replace(',','')
print(a)
Upvotes: 0