GPB*_*GPB 1 python json pandas socrata
更新:我正在使用“ Socrata开源API”中的一些示例代码。我在代码中注意到以下注释:
# First 2000 results, returned as JSON from API / converted to Python
# list of dictionaries by sodapy.
Run Code Online (Sandbox Code Playgroud)
我不熟悉JSON。
我已经下载了一个数据集,并创建了一个包含大量列的DataFrame'df'。
df = pd.DataFrame.from_records(results)
Run Code Online (Sandbox Code Playgroud)
当我尝试使用describe()方法时,出现“ TypeError:无法散列的类型:'dict'”:
df.describe()
...
TypeError: unhashable type: 'dict'
Run Code Online (Sandbox Code Playgroud)
如何识别产生此错误的列?
更新2:根据Yuca的要求,我提供了df的摘录: