代码如下:
In : f = open('E:/python/data.json','r+')
In : f
Out : <_io.TextIOWrapper name='E:/python/data.json' mode='r+' encoding='cp936'>
这个输出是什么意思?
In :a = pd.Series(f)
TypeError Traceback (most recent call last)
<ipython-input-10-de5589147c94> in <module>()
----> 1 a = pd.Series(f)
E:Anacondalibsite-packagespandascoreseries.py in __init__(self, data, index, dtype, name, copy, fastpath)
235 if not is_list_like(data):
236 data = [data]
--> 237 index = _default_index(len(data))
238
239 # create/copy the manager
TypeError: object of type '_io.TextIOWrapper' has no len()
出现错误不知道怎么修改,帮帮忙!