这是一个非常奇怪的错误:IPython的笔记本不打印型()
以下代码:
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笔记本中,应该显示类型的单元格为空:
啊,这很有道理。任何解决方法的想法? – ChrisArmstrong
我能够通过转换为字符串和注册表来解决所有问题,但实际的数据类型出来...不漂亮,但它的工作原理和它更紧凑,然后打印整个废话 –
ChrisArmstrong
这不是IPython中的错误,这是熊猫的一个错误 - 大熊猫告诉IPython它已经有一个HTML repr,IPython信任它已经正确转义,但事实并非如此。作为熊猫开放[问题2617](https://github.com/pydata/pandas/issues/2617)。 – minrk