3okhir
3okhir

Reputation: 21

Need help automating scraping a necessary code of a website using selenium

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.

enter image description here

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

Answers (2)

SeaBean
SeaBean

Reputation: 23217

Try str.replace(), as follows:

data['Client_name'] = data['Client_name'].str.replace(',', '')

Upvotes: 1

cruisepandey
cruisepandey

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

Related Questions