# ---
# 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
import numpy as np
import matplotlib.pyplot as plt

from sklearn import datasets
from pandas.plotting import scatter_matrix

plt.style.use('ggplot')
iris = datasets.load_iris()

print(type(iris))

df = pd.DataFrame(iris.data, columns = iris.feature_names)
print(df.head())

s1 = df['sepal length (cm)']
print("avg={}".format(np.mean(s1)))
print("std={}".format(np.std(s1))) 
print("var={}".format(np.var(s1))) 
print("min={}".format(np.min(s1))) 
print("max={}".format(np.max(s1))) 
#print("idxmin={}".format(np.idxmin(s1))) 
#print("idxmax={}".format(np.idxmax(s1))) 
print("median={}".format(np.median(s1))) 
print("80th percentile={}".format(np.percentile(s1, 80))) 
print("sum={}".format(np.sum(s1))) 
print("any={}".format(np.any(s1))) 
print("all={}".format(np.all(s1))) 

# -



StarcoderdataJupyterScriptsDedupFiltered