再见!在
我试着运行这个程序:
import pandas as pd
import gmaps #import the gmaps library
import gmaps.datasets #imports the gmaps.datasets library
gmaps.configure(api_key='< API Key >') # Fill in with your API key
earthquake_df = gmaps.datasets.load_dataset_as_df('earthquakes') #equate your raw data to the designated dataset
earthquake_df.head()
locations = earthquake_df[['latitude', 'longitude']] #locate the
weights = earthquake_df['magnitude']
fig = gmaps.figure()
fig.add_layer(gmaps.heatmap_layer(locations, weights=weights))
fig
但没有显示图像,而是出现以下错误:
^{pr2}$我不知道那是什么意思?任何人,请帮帮我!谢谢!在
目前没有回答
相关问题 更多 >
编程相关推荐