title: Convert nested JSON to CSV file in Python
body: <p>I know this question has been asked many times. I tried several solutions but I couldn't solve my problem.</p>
  
  <p>I have a large nested JSON file (1.4GB) and I would like to make it flat and then convert it to a CSV file.</p>
  
  <p>The JSON structure is like this:</p>
  
  <pre><code>{
    "company_number": "12345678",
    "data": {
      "address": {
        "address_line_1": "Address 1",
        "locality": "Henley-On-Thames",
        "postal_code": "RG9 1DP",
        "premises": "161",
        "region": "Oxfordshire"
      },
      "country_of_residence": "England",
      "date_of_birth": {
        "month": 2,
        "year": 1977
      },
      "etag": "26281dhge33b22df2359sd6afsff2cb8cf62bb4a7f00",
      "kind": "individual-person-with-significant-control",
      "links": {
        "self": "/company/12345678/persons-with-significant-control/individual/bIhuKnFctSnjrDjUG8n3NgOrl"
      },
      "name": "John M Smith",
      "name_elements": {
        "forename": "John",
        "middle_name": "M",
        "surname": "Smith",
        "title": "Mrs"
      },
      "nationality": "Vietnamese",
      "natures_of_control": [
        "ownership-of-shares-50-to-75-percent"
      ],
      "notified_on": "2016-04-06"
    }
  }
  </code></pre>
  
  <p>I know that this is easy to accomplish with <code>pandas</code> module but I am not familiar with it.</p>
  
  <p><strong>EDITED</strong></p>
  
  <p>The desired output should be something like this:</p>
  
  <pre><code>company_number, address_line_1, locality, country_of_residence, kind,
  
  12345678, Address 1, Henley-On-Thamed, England, individual-person-with-significant-control
  </code></pre>
  
  <p>Note that this is just the short version. The output should have all the fields.</p>