Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Handling escape charters while converting data frame to JSON
#1
Hi All,
I am new to the python programming so please bear with me if question seems to basic.

i have created url column in my dataframe

df['url'] = r"https://apps.occ.gov/EASearch/?Search=&Category=&ItemsPerPage=10&Sort=&AutoCompleteSelection="

df.head(5)

otherinfo entity ... dob url
0 ... https://apps.occ.gov/EASearch/?Search=&Categor...
1 ... https://apps.occ.gov/EASearch/?Search=&Categor...
2 ... https://apps.occ.gov/EASearch/?Search=&Categor...
3 ... https://apps.occ.gov/EASearch/?Search=&Categor...
4 ... https://apps.occ.gov/EASearch/?Search=&Categor...

but when i am converting my dataframe to json

df.to_json (r'filepath', orient='records')

In the create json, i am getting :

"url":"https:\/\/apps.occ.gov\/EASearch\/?Search=&Category=&ItemsPerPage=10&Sort=&AutoCompleteSelection="

How do i fix this
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Loop pandas data frame by position ? Johnse 1 263 Sep-06-2019, 12:26 AM
Last Post: scidam
  pandas data frame dervast 1 236 Aug-28-2019, 12:40 PM
Last Post: ThomasL
  save my sensor data from the bme680 into a json or csv file Plastefuchs84 1 347 Aug-23-2019, 03:04 AM
Last Post: Plastefuchs84
  Insert Pandas Data Frame into Teradata DB kylenater 0 931 Jul-19-2019, 04:53 PM
Last Post: kylenater
  Creating new rows and adding them to empty data frame kapilan15 0 304 May-31-2019, 10:19 AM
Last Post: kapilan15
  Getting the difference between two times in a Data Frame soulkid555 4 498 Mar-21-2019, 11:22 AM
Last Post: perfringo
  Converting text data into numeric to use SVM mukhan169 6 717 Jan-23-2019, 01:08 PM
Last Post: mukhan169
  save video frames into pandas data-frame tofi 0 537 Oct-18-2018, 07:02 PM
Last Post: tofi
  Best way to append data frame? WuchaDoin 1 636 Oct-04-2018, 07:17 PM
Last Post: volcano63
  Pandas nested json data to dataframe FrankC 1 5,548 Aug-14-2018, 01:37 AM
Last Post: scidam

Forum Jump:


Users browsing this thread: 1 Guest(s)