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
  Pandas data frame creation from Kafka Topic vboppa 0 67 Jul-01-2020, 04:23 PM
Last Post: vboppa
  Filter rows by multiple text conditions in another data frame i.e contains strings an Pan 0 329 Jun-09-2020, 06:05 AM
Last Post: Pan
  Read json array data by pandas vipinct 0 215 Apr-13-2020, 02:24 PM
Last Post: vipinct
  Displaying Result from Data Frame from Function eagle 1 306 Apr-08-2020, 11:58 PM
Last Post: eagle
  add formatted column to pandas data frame alkaline3 0 239 Mar-22-2020, 06:44 PM
Last Post: alkaline3
  reformatting data frame tkirkland 0 186 Mar-18-2020, 02:17 PM
Last Post: tkirkland
  Help batch converting .json chosen file to MySQL BrandonKastning 2 316 Mar-14-2020, 09:19 PM
Last Post: BrandonKastning
  How to modify data frame row value SriRajesh 0 212 Feb-12-2020, 05:46 PM
Last Post: SriRajesh
  Loop pandas data frame by position ? Johnse 1 554 Sep-06-2019, 12:26 AM
Last Post: scidam
  pandas data frame dervast 1 460 Aug-28-2019, 12:40 PM
Last Post: ThomasL

Forum Jump:


Users browsing this thread: 1 Guest(s)