python-3.x - 为 scatter 的“fillcolor”属性接收到的“builtins.bool”类型的无效值
问题描述
我正在尝试在 python 3.6 中使用 quantmod 和 plotly 创建股票价值的财务图表。我基本上已经从 https://github.com/jackluo/py-quantmod/blob/master/start_here.ipynb 复制了示例代码。这是抛出一个错误。这是我的代码:
import pandas as pd
pd.core.common.is_list_like = pd.api.types.is_list_like
import plotly.graph_objs as go
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
init_notebook_mode(connected=True)
from plotly import tools
from datetime import datetime
from dateutil import parser
import quantmod as qm
import talib as ta
df = pd.read_csv('es-sample.csv', index_col=0)
df.columns = [c.strip() for c in df.columns]
ch = qm.Chart(df)
ch.add_RSI(14)
ch.plot()
这是显示的错误:
ValueError:
Invalid value of type 'builtins.bool' received for the 'fillcolor' property of scatter
Received value: False
The 'fillcolor' property is a color and may be specified as:
- A hex string (e.g. '#ff0000')
- An rgb/rgba string (e.g. 'rgb(255,0,0)')
- An hsl/hsla string (e.g. 'hsl(0,100%,50%)')
- An hsv/hsva string (e.g. 'hsv(0,100%,100%)')
- A named CSS color:
aliceblue, antiquewhite, aqua, aquamarine, azure,
beige, bisque, black, blanchedalmond, blue,
blueviolet, brown, burlywood, cadetblue,
我不知道该怎么做才能解决这个问题。
解决方案
推荐阅读
- ios - 查看优先级以填充 StackView 宽度
- kubernetes - Kubernetes - 没有从死节点中驱逐 pod
- python - 如何将 3D 张量转换为 one_hot 编码
- python - 对箭头结构的属性进行连接操作
- php - 如何在codeigniter的选择框中显示数据库中的选定值
- python - 将 JSON 加载到 Spark 数据框
- r - 自定义方差 R 函数给了我 NA
- ip - ESP8266 如何使用作为网络服务器运行的 esp8266 库 v2.6.3 获取客户端 IP
- r - SparkR中的R fastdummies等价物
- python - 有没有办法删除字符串中每个单词的开头和结尾的标点符号而不是中间的标点符号?Python