add new info to the file
This commit is contained in:
parent
45dbd70499
commit
742f7d0d3f
45
practica/math/statistic/statistic_tests/test.py
Normal file
45
practica/math/statistic/statistic_tests/test.py
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# import pandas as pd
|
||||||
|
# import matplotlib.pyplot as plt
|
||||||
|
# import statsmodels.api as sm
|
||||||
|
# from statsmodels.formula.api import ols
|
||||||
|
# import seaborn as sns
|
||||||
|
# import numpy as np
|
||||||
|
# import pandas.tseries
|
||||||
|
# plt.style.use('fivethirtyeight')
|
||||||
|
|
||||||
|
# mydata = pd.read_csv('c:/Users/admin/Documents/prog/hello/practica/DataBase/diet.csv')
|
||||||
|
# print(mydata.head()) # просмотр данных
|
||||||
|
# print('The total number of rows in the dataset:', mydata.size) # размер файла (строк)
|
||||||
|
# print(mydata.gender.unique())
|
||||||
|
# print(mydata[mydata.gender == ' ']) # проверяем и удаляем значения которые отсутствуют в наборе
|
||||||
|
# # f, ax = plt.subplots( figsize =(11,9) )
|
||||||
|
# # sns.distplot( mydata)
|
||||||
|
# # plt.show()
|
||||||
|
# f, ax = plt.subplots( figsize =(11,9) )
|
||||||
|
# sns.distplot( mydata[mydata.gender == '1'].weight6weeks, ax = ax, label = 'Male')
|
||||||
|
# sns.distplot( mydata[mydata.gender == '0'].weight6weeks, ax = ax, label = 'Female')
|
||||||
|
# plt.title( 'Weight Distribution for Each Gender' )
|
||||||
|
# plt.legend()
|
||||||
|
# plt.show()
|
||||||
|
|
||||||
|
|
||||||
|
# import matplotlib.pyplot as plt
|
||||||
|
# import seaborn as sns
|
||||||
|
|
||||||
|
# # Генерируем случайные данные
|
||||||
|
# data = [23, 34, 45, 67, 23, 56, 78, 89, 43, 65, 34, 56, 76]
|
||||||
|
|
||||||
|
# # Построение ящика с усами
|
||||||
|
# plt.boxplot(data)
|
||||||
|
# plt.ylabel('Значения')
|
||||||
|
# plt.title('')
|
||||||
|
# plt.show()
|
||||||
|
|
||||||
|
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
|
||||||
|
plt.hist(data['Цена'], bins=20, color='blue', alpha=0.7)
|
||||||
|
plt.xlabel('Цена')
|
||||||
|
plt.ylabel('Частота')
|
||||||
|
plt.title('Распределение цен на продукты')
|
||||||
|
plt.show()
|
Loading…
Reference in New Issue
Block a user