title: pandas astype python bool instead of numpy.bool_
body: <p>I need to convert a pandas dataframe to a JSON object. </p>
  
  <p>However</p>
  
  <pre><code>json.dumps(df.to_dict(orient='records'))
  </code></pre>
  
  <p>fails as the boolean columns are not JSON serializable since they are of type <code>numpy.bool_</code>. Now I've tried <code>df['boolCol'] = df['boolCol'].astype(bool)</code> but that still leaves the type of the fields as <code>numpy.bool_</code> rather than the pyhton bool which serializes to JSON no problem.</p>
  
  <p>Any suggestions on how to convert the columns without looping through every record and converting it?</p>
  
  <p>Thanks</p>
  
  <p>EDIT:</p>
  
  <p>This is part of a whole sanitization of dataframes of varying content so they can be used as the JSON payload for an API. Hence we currently have something like this:</p>
  
  <pre><code>for cols in df.columns:
      if type(df[cols][0]) == pd._libs.tslibs.timestamps.Timestamp:
          df[cols] = df[cols].astype(str)
      elif type(df[cols]) == numpy.bool_:
          df[cols] = df[cols].astype(bool) #still numnpy bool afterwards!
  </code></pre>