2017-10-19 156 views
-2

我在python中加载gmaps包。 但是当Jupyther笔记本我键入命令:jupyter笔记本上的Gmaps问题

import gmaps 
gmaps.configure(api_key="AI") 
data = gmaps.datasets.load_dataset("taxi_rides")* 

我有这样的错误消息:

*AttributeError: 'module' object has no attribute 'datasets'* 

请问有人知道是怎么回事?

回答

0

有点迟到了,但你没有输入正确模块:

import gmaps 
import gmaps.datasets # You also need to import this! 

gmaps.configure(api_key="AI") 
data = gmaps.datasets.load_dataset("taxi_rides")