为什么用list来作为地图的数据会报错,但是用generator就正常呢?官方文档的demo也是用list的
pyecharts官方文档 https://pyecharts.org/#/zh-cn/geography_charts?id=geo%ef%bc%9a%e5%9c%b0%e7%90%86%e5%9d%90%e6%a0%87%e7%b3%bb
为什么用list来作为地图的数据会报错,但是用generator就正常呢?官方文档的demo也是用list的
pyecharts官方文档 https://pyecharts.org/#/zh-cn/geography_charts?id=geo%ef%bc%9a%e5%9c%b0%e7%90%86%e5%9d%90%e6%a0%87%e7%b3%bb
我感觉问题不是出在list的问题上,应该是处在Geo上,如果列表中出现Geo中不存在的点,那么Geo就会报错,所以可以使用Geo.get_coordinate(name)来判断元素是不是会导致Geo报错