# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
import pandas as pd

data = pd.read_excel('data.xlsx')
# -

data.describe()

import seaborn as sns
import matplotlib.pyplot as plt

data['Unnamed: 0']

plt.figure()
sns.distplot(data['Unnamed: 2'].dropna())
plt.show()

plt.figure()
dts = data['Unnamed: 2'].dropna()
dts = dts.drop(dts[dts>100000].index)
sns.distplot(dts)
plt.show()

from xlrd import * 

wb = open_workbook('data.xlsx')

print(wb.sheets())
print(wb.sheets()[0].nrows)

regions = ['Российская Федерация', 'Центральный федеральный округ']
education = ['послевузовское', 'высшее', 'неполное высшее', 'среднее', 'начальное', 'без образования', 'неграмотные']

region_name_to_id = {
    'Белгородская область': 36,
    'Владимирская область': 37,
    'Ивановская область': 41,
}


sheet = wb.sheets()[0]
for i in range(sheet.nrows):
    if sheet.cell(i,1).value in region_name_to_id:
        postgrad = sheet.cell(i+2,4).value
        higher  =  sheet.cell(i+2,5).value
        higherip = sheet.cell(i+2,9).value
        middle = sheet.cell(i+2,10).value
        basic = sheet.cell(i+2,11).value
        noeducation = sheet.cell(i+2,15).value
        nothing = sheet.cell(i+2, 16).value
        
        col = 10
        print(sheet.cell(i+118, 1).value)
        



StarcoderdataJupyterScriptsDedupFiltered