title: Get rid of columns with null value in json output
body: <p>I'm writing data from dataframe to json file using pandas function .to_json like this:</p>
  
  <pre><code>xx.to_json('file_path',orient='records',lines=True)
  </code></pre>
  
  <p>The output of this looks like this:</p>
  
  <pre><code>{"speed":null,"state":4.0,"stop_trigger":null,"t":1527237121263,"target_speed":null}
  {"speed":null,"state":null,"stop_trigger":null,"t":1527237121264,"target_speed":400.0}
  </code></pre>
  
  <p>How is it possible to get rid of columns in the output if there are null values?:</p>
  
  <pre><code>{"state":4.0,"t":1527237121263}
  {"t":1527237121264,"target_speed":400.0}
  </code></pre>