0

I'm iterating through a pandas dataframe and fetch values:

for index, row in df.iterrows():
    st= row.values

I have a column called text where the value is

"current user's role"

I would like to convert that to (single quotes and a backslash in front the apostrophe in user's

'current user\'s role'

I would like to get the backslash also inserted to the string. I'm tryning to make a DML (insert) statement here

Krishh
  • 103
  • 1
  • 8
  • 2
    String delimiters are not part of the string's content. The string's content is just `current user's role`. – khelwood Mar 01 '22 at 16:30
  • 1
    How will that help you to get what you want? – quamrana Mar 01 '22 at 16:41
  • its not the same thing.. I'm trying to make a DML statement (insert into table values ().. I would like to get the text in single quotes with a backslash infront of the apostraphe character which would make it work. – Krishh Mar 01 '22 at 16:43

0 Answers0