Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

Mapping objects in a json file to column headers in Pandas

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

I was hoping that someone here may be able to help me. I would like to map to entities together from a json file and use them as headers in a pandas data frame. For example, I would like to first map the two objects in the picture below:



As you can see in the json file, I want to map the 'file_name' to the 'entity_submitter_id' then I would like to display the 'entity_submitter_id' to the column headers in my data frame. I have tried the following code to try and reproduce this below:



When I print the head of the data frame, you can see the column headers are a mix of characters. Can anyone share how I can change those headers to the 'entity_submiter_id' in the json file? Your help would be much appreciated. Thanks in advance for any help!
reply
    Bookmark Topic Watch Topic
  • New Topic