HabKaffee

Untitled

Apr 21st, 2021
707
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. import numpy as np
  3. import matplotlib.pyplot as plt
  4. import seaborn as sns
  5. import plotly.express as px
  6. wb = load_workbook('/content/drive/My Drive/Colab Notebooks/table_to_proga.xlsx')
  7.  
  8. sheet = wb['institutions_csv']
  9.  
  10. fifthColumn = list()
  11.  
  12. for i in range(2,343): #range от 2 до 343 потому что мы заполняем таблицу по i, row и col должны быть больше 0. Берем со 2 индекса, потому что в 1 строке хранится название каждого столбца
  13.  
  14.      fifthColumn.append(sheet.cell(row=i, column=5).value)
  15.  
  16. d = dict.fromkeys(fifthColumn_set,0)
  17. for item in fifthColumn:
  18.     d[item] +=1
  19.  
  20. #print (d)
  21. #print(fifthColumn_set)
  22.  
  23. arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 34, 35, 38, 40, 41]
  24. arrVal = [8,7,11,13,10,6,10,12,23,1,13,23,20,38,2,10,12,16,1,15,9,19,34,10,3,7,2,2]
  25.  
  26. fig, ax = plt.subplots()
  27. explode = (0,0,0,0,0,0,0,0,0,0,0,0,0,0.2,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
  28. plt.figure(figsize=(20,10), dpi=500)
  29. ax.pie(arrVal, labels = arr, explode=explode)
  30. ax.axis("equal")
  31. print('Диаграмма, показывающая соотношение значений в графе "Stratification cell"')
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×