title: Pandas to_json in separate lines
body: <p>How can I get the json format from pandas, where each rows are separated with new line.  For example if I have a dataframe like:</p>
  <pre><code>import pandas as pd
  
  data = [{'a': 1, 'b': 2},
          {'a': 3, 'b': 4}]
  
  df = pd.DataFrame(data)
  
  
  print(&quot;First:\n&quot;, df.to_json(orient=&quot;records&quot;))
  
  print(&quot;Second:\n&quot;, df.to_json(orient=&quot;records&quot;, lines=True))
  </code></pre>
  <p>Output:</p>
  <pre><code>First:
   [{&quot;a&quot;:1,&quot;b&quot;:2},{&quot;a&quot;:3,&quot;b&quot;:4}]
  Second:
   {&quot;a&quot;:1,&quot;b&quot;:2}
  {&quot;a&quot;:3,&quot;b&quot;:4}
  </code></pre>
  <p>But I really want an output like so:</p>
  <pre><code>[{&quot;a&quot;:1,&quot;b&quot;:2},
  {&quot;a&quot;:3,&quot;b&quot;:4}]
  </code></pre>
  <p>or</p>
  <pre><code>[
   {&quot;a&quot;:1,&quot;b&quot;:2},
   {&quot;a&quot;:3,&quot;b&quot;:4}
  ]
  </code></pre>
  <p>I really just want each line to be separated by new line, but still a valid json format that can be read.  I know I can use <code>to_json</code> with <code>lines=True</code> and just split by new line then <code>.join</code>, but wondering if there is a more straight forward/faster solution just using pandas.</p>