试图列出总数

时间:2019-04-03 20:17:54

标签: dart flutter

所以我有两个列表,每个列表都映射到它们以获取int,然后我使用了reduce函数对它们进行总计。

我现在只需要在一个新列表中同时使用这两个总数,例如由TotalsEntry组成的totalsList或其他内容。

这怎么办?

geometry2 = [Point(xy) for xy in zip( df2['Longitude'], df2010['Latitude'])]
fig,ax = plt.subplots(figsize=(15,15))
geo_df2 = gpd.GeoDataFrame(df2, crs = {'init':'epsg:4326'}, geometry = geometry2)
fig,ax = plt.subplots(figsize=(15,15))
nycmap.plot(ax = ax, alpha = 0.4, color="blue")
geo_df2[geo_df2['sum'] <= 1236].plot(ax=ax, markersize=1, color = 'red', marker = 'x', label = "Below")
geo_df2[(geo_df2['sum'] > 1237) & (geo_df2['sum'] <= 1606)].plot(ax=ax, markersize=1, color = 'orange', marker = 'x', label = "Average")
geo_df2[(geo_df2['sum'] < 1607) & (geo_df2['sum'] <= 2087)].plot(ax=ax, markersize=1, color = 'green', marker = 'x', label = "Max")
plt.legend(prop={'size': 15})

所有这些都很好。我可以在应用程序内使用totalSales和totalExpenses。

1 个答案:

答案 0 :(得分:0)

如果我对您的理解正确,那么以下工作应该已经完成​​:

List<int> get totalsList => [totalSales, totalExpenses];