Nawar
Nawar

Reputation: 11

Replace part of a string (column name) in Python or Pandas?

How to replace a part of a string in Python or Pandas?

"xxsffsfdewetczxCATINTHEHATxxxxxxxxDrSeussfggfhgfh"

anything like the excel function (CATINTHEHATDrSeuss) to replace the whole string and just keep those two sentences, Thanks

Upvotes: 0

Views: 156

Answers (1)

Ward
Ward

Reputation: 799

As mentioned here: https://www.tutorialspoint.com/python/string_replace.htm

str.replace(old, new[, max])

Upvotes: 1

Related Questions