作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用带有 Python 2.7 的 WinPython Notebook。所以我正在阅读几个这样的 DataFrame:
run[y2][y3][x] = pd.read_excel(xls_file, x)
当我使用:
run[y2][y3][x].plot()
我得到了包含 3 条线的漂亮图,以及一个描述这些线的图例,就像列顶部的 Excel 文件中一样。
但是,当我这样绘制时:
run[case]['fluent'][var].plot(x = 'r', y = 'inlet')
我在图例中得到的只是“无”。即使我在 .plot() 部分使用 label = 'inlet'
。
最佳答案
这是 pandas 中的一个错误,将在即将发布的 0.16.1 版本中修复(请参阅 https://github.com/pydata/pandas/pull/9574 )。
目前可能的解决方法是将 y
列作为列表提供:
df.plot(x='r', y=['inlet'])
关于excel - 传说中的pandas python中的"None",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29989863/
我有一个带有图例的字段集。 TEXT 我正在尝试应用一种样式,我需要以下内容: 示例 1: --------------------文本------------------------ 示例
我是一名优秀的程序员,十分优秀!