【发布时间】:2012-12-15 02:14:38
【问题描述】:
这是一个非常奇怪的错误:
以下代码:
a = 'string1'
b = 'string2'
test_dict = {'col1':{a:type(a), b:type(b)},'col2':{a:type(a), b:type(b)}}
pd.DataFrame(test_dict)
在正常的 ipython 控制台中,按预期产生以下结果:
col1 col2
string1 <type 'str'> <type 'str'>
string2 <type 'str'> <type 'str'>
但是在 ipython notebook 中,应该显示类型的单元格是空的:
【问题讨论】:
标签: python pandas ipython ipython-notebook