python与excel做数据可视化-python数据可视化怎么做?excel可视化图表制作?

num_score_300_310 = 0num_score_310_320 = 0num_score_320_330 = 0num_score_330_340 = 0num_score_340_350 = 0num_score_350_360 = 0num_score_360_370 = 0num_score_370_380 = 0num_score_380_390 = 0num_score_390_400 = 0num_score_400_410 = 0min_score = 999max_score = 0# 将各个分段的数量统计for i in tables:score = i["preliminary_score"]if score > max_score:max_score = scoreif score < min_score:min_score = scoreif score in range(300, 310):num_score_300_310 = num_score_300_310 + 1elif score in range(310, 320):num_score_310_320 = num_score_310_320 + 1elif score in range(320, 330):num_score_320_330 = num_score_320_330 + 1elif score in range(330, 340):num_score_330_340 = num_score_330_340 + 1elif score in range(340, 350):num_score_340_350 = num_score_340_350 + 1elif score in range(350, 360):num_score_350_360 = num_score_350_360 + 1elif score in range(360, 370):num_score_360_370 = num_score_360_370 + 1elif score in range(370, 380):num_score_370_380 = num_score_370_380 + 1elif score in range(380, 390):num_score_380_390 = num_score_380_390 + 1elif score in range(390, 400):num_score_390_400 = num_score_390_400 + 1elif score in range(400, 410):num_score_400_410 = num_score_400_410 + 1# 构建两个元组用以后期建表方便bar_x_axis_data = ("300-310", "310-320", "320-330", "330-340", "340-350", "350-360", "360-370", "370-380", "380-390", "390-400", "400-410")bar_y_axis_data = (num_score_300_310, num_score_310_320, num_score_320_330, um_score_330_340, num_score_340_350, num_score_350_360, um_score_360_370, num_score_370_380, num_score_380_390, um_score_390_400, num_score_400_410)

你可能感兴趣的:(python与excel做数据可视化-python数据可视化怎么做?excel可视化图表制作?)