我当时正在用大叶草制作一个脉络膜图。但是遇到Type错误。请告诉我如何解决。谢谢
sanfran_map.choropleth(
geo_data=sanf_geo,
data=df_map,
columns=['Neighborhood', 'Count'],
key_on='feature.properties.name',
fill_color='YlOrRd',
fill_opacity=0.7,
line_opacity=0.2,
legend_name='Crime Rate')
这是错误消息。
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-7-0f32cb47b5e0> in <module>()
7 fill_opacity=0.7,
8 line_opacity=0.2,
----> 9 legend_name='Crime Rate'
10 )
~/conda/lib/python3.6/site-packages/folium/folium.py in choropleth(self, geo_data, data, columns, key_on, threshold_scale, fill_color, fill_opacity, line_color, line_weight, line_opacity, name, legend_name, topojson, reset, smooth_factor, highlight)
271 data_max = (data_max if data_max > 0 else 0
272 if data_max < 0 else 1)
--> 273 data_min, data_max = (1.01*data_min-0.01*data_max,
274 1.01*data_max-0.01*data_min)
275 nb_class = 6
TypeError: unsupported operand type(s) for *: 'float' and 'decimal.Decimal'