我一直在研究这个Udacity web dev课程,并想尝试使用这个例子将简单的散景图嵌入到网页中.运行dev_appserver.py
给出错误:ImportError: No module named _ctypes
我有:
这个答案表明Google App Engine不允许导入ctypes.但是我不确定如何确认Bokeh是否属于这种情况.这是由Bokeh导入ctypes引起的错误吗?如果有的话有解决方法吗?
ERROR 2017-01-21 19:14:53,799 wsgi.py:263]
Traceback (most recent call last):
File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\main.py", line 2, in …
Run Code Online (Sandbox Code Playgroud) 我想Series
用字典替换大熊猫中的值.我正在关注@ DSM 接受的答案:
s = Series(['abc', 'abe', 'abg'])
d = {'b': 'B'}
s.replace(d)
Run Code Online (Sandbox Code Playgroud)
但这没有任何影响:
0 abc
1 abe
2 abg
dtype: object
Run Code Online (Sandbox Code Playgroud)
该文档解释了所需的dict格式DataFrames
(即嵌套的dicts与顶级键对应的列名),但我看不到任何特定的Series
.