<jupyter_start><jupyter_text>Secara Visual<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
%matplotlib inline
plt.style.use('seaborn')
iris = pd.read_csv('data/iris.csv')
iris.shape
iris.head()
iris.plot(x='sepal_length', y='sepal_width')
iris.plot(x='sepal_length', y='sepal_width', kind='scatter')
plt.xlabel('sepal length (cm)')
plt.ylabel('sepal width (cm)')
iris.plot(y='sepal_length', kind='box')
plt.ylabel('sepal width (cm)')
iris.plot(y='sepal_length', kind='hist')
plt.xlabel('sepal length (cm)')
iris.plot(y='sepal_length', kind='hist', bins=30, range=(4,8), normed=True)
plt.xlabel('sepal length (cm)')
plt.show()
iris.plot(y='sepal_length', kind='hist', bins=30, range=(4,8), cumulative=True, normed=True)
plt.xlabel('sepal length (cm)')
plt.title('Cumulative distribution function (CDF)')<jupyter_output><empty_output><jupyter_text>Secara Statistik<jupyter_code>iris.describe()
iris.count()
iris['sepal_length'].count()
iris.mean()
iris.std()
iris.median()
q = 0.5
iris.quantile(q)
q = [0.25, 0.75]
iris.quantile(q)
iris.min()
iris.max()
iris.plot(kind= 'box')
plt.ylabel('[cm]')<jupyter_output><empty_output><jupyter_text>Filtering<jupyter_code>iris.head()
iris['species'].describe()
iris['species'].value_counts()
iris['species'].unique()
index_setosa = iris['species'] == 'setosa'
index_versicolor = iris['species'] == 'versicolor'
index_virginica = iris['species'] == 'virginica'
setosa = iris[index_setosa]
versicolor = iris[index_versicolor]
virginica = iris[index_virginica]
setosa['species'].unique()
versicolor['species'].unique()
virginica['species'].unique()
setosa.head(2)
versicolor.head(2)
virginica.head(2)
iris.plot(kind= 'hist', bins=50, range=(0,8), alpha=0.4)
plt.title('Entire iris data set')
plt.xlabel('[cm]')
setosa.plot(kind='hist', bins=50, range=(0,8), alpha=0.5)
plt.title('Setosa data set')
plt.xlabel('[cm]')
versicolor.plot(kind='hist', bins=50, range=(0,8), alpha=0.5)
plt.title('Versicolor data set')
plt.xlabel('[cm]')
virginica.plot(kind='hist', bins=50, range=(0,8), alpha=0.3)
plt.title('Virginica data set')
plt.xlabel('[cm]')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2066854990583804, 'fraction_numerical': 0.02024482109227872, 'mean_word_length': 9.119047619047619, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '3079', 'license': 'MIT', 'n_tokens_mistral': 929, 'n_tokens_neox': 871, 'n_words': 135, 'path': 'Bagian 4 - Fundamental Pandas/2. Exploratory Data Analysis.ipynb', 'repo_name': 'selmakaramy/Data-warehouse', 'size': '2124'}