0

I used to have a simple row and column format in table and was reading it by pandassql .

but if you have structure like below and want to get age>10 from this , how do I get it using pandassql?

  [  {
    "response":{
      "version":"1.1",
      "token":"dsfgf",
       "body":{
         "customer":{
             "customer_id":"1234567",
             "verified":"true"
           },
         "contact":{
             "email":"[email protected]",
             "mobile_number":"0123456789"
          },
         "personal":{
             "gender": "m",
             "title":"Dr.",
             "last_name":"Muster",
             "first_name":"Max",
             "family_status":"single",
             "dob":"1985-12-23",
         }
       }
     } ]
2
  • there is an error with the json. need to remove the first bracket. Commented May 27, 2021 at 22:42
  • Does this answer your question? Pandas read nested json Commented May 27, 2021 at 23:00

1 Answer 1

0

This is answered here:

Pandas read nested json

You can use json_normalize

There is also a full description of the dame issue here:

https://medium.com/swlh/converting-nested-json-structures-to-pandas-dataframes-e8106c59976e

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.