title: error says it a Pandas DataFrame when dumping a Python dict
body: <p>I have a Python dictionary, but when I try to dump it as a <em>JSON</em> file, it says it is a Pandas DataFrame!</p>
  <pre><code>import pandas as pd
  import os
  import re
  import json
  
  files_net = [f for f in os.listdir('.') if re.match(r'network_.+.json', f)]
      
  networks = {}
  for file in files_net:
      with open(file) as f:
          networks[re.search(r'network_(.+).json', file).group(1)] = pd.read_json(f)
  type(networks)
  
  &gt;&gt;&gt; dict
  
  with open('networks.json', 'w') as f:
      json.dump(networks, f)
  
  TypeError: Object of type DataFrame is not JSON serializable
  </code></pre>