Pandas Styler对象没有属性隐藏索引错误

时间:2019-03-07 19:59:37

标签: python python-3.x pandas

我有以下数据框:

enter image description here

我正在尝试hide the index

df.style.hide_index()

但是我遇到以下错误:AttributeError: 'Styler' object has no attribute 'hide_index'

有关如何更正此错误的任何建议? 谢谢!

1 个答案:

答案 0 :(得分:1)

Styler的熊猫文档说

  

临时:这是一项新功能,仍在开发中。好   增加功能并可能在将来做出重大更改   发布。我们希望听到您的反馈。

所以您使用的Pandas版本可能会使它无法正常工作。