title: Pandas select which rows to read JSON
body: <p>I have a huge <code>JSON</code> file (lots of smaller <code>.log</code> (<code>JSON</code> format) files combined together to a total of 8Gb), composed of <strong>multiple different objects</strong> (where every object takes a row). I want to read this file into a <code>pandas dataframe</code>. I am only interested in collecting the <code>JSON</code> entries for <strong>one specific object</strong> (this would drastically reduce the file size to read). Can this be done with <code>pandas</code> or <code>python</code> before reading in a <code>dataframe</code>?</p>
  
  <p><strong>My current code is as follows:</strong></p>
  
  <pre><code>import pandas as pd
  import glob
  
  df = pd.concat([pd.read_json(f, encoding = "ISO-8859-1", lines=True) for f in glob.glob("logs/sample1/*.log")], ignore_index=True)
  </code></pre>
  
  <p>As you might imagine, this is very computationally heavy, and takes a lot of time to complete. Is there a way to process this before reading it in a <code>dataframe</code>?</p>
  
  <p><strong>Sample of Data:</strong></p>
  
  <pre><code>{"Name": "1","variable": "value","X": {"nested_var": 5000,"nested_var2": 2000}}
  {"Name": "2","variable": "value","X": {"nested_var": 1222,"nested_var2": 8465}}
  {"Name": "2","variable": "value","X": {"nested_var": 123,"nested_var2": 865}}
  {"Name": "1","variable": "value","X": {"nested_var": 5500,"nested_var2": 2070}}
  {"Name": "2","variable": "value","X": {"nested_var": 985,"nested_var2": 85}}
  {"Name": "2","variable": "value","X": {"nested_var": 45,"nested_var2": 77}}
  </code></pre>
  
  <p>I want to only read instances where <code>name = 1</code></p>