<jupyter_start><jupyter_text>DAT210x - Programming with Python for DS  Module3 - Lab1<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
# Look pretty...

# matplotlib.style.use('ggplot')
plt.style.use('ggplot')<jupyter_output><empty_output><jupyter_text>Load up the wheat seeds dataset into a dataframe. We've stored a copy in the Datasets directory.<jupyter_code>df = pd.read_csv('./Datasets/wheat.data', index_col=0)
df.head()<jupyter_output><empty_output><jupyter_text>Create a slice from your dataframe and name the variable `s1`. It should only include the `area` and `perimeter` features.<jupyter_code>s1 = df.loc[:,['area','perimeter']]
s1.head()<jupyter_output><empty_output><jupyter_text>Create another slice of from dataframe called it `s2` this time. Slice out only the `groove` and `asymmetry` features:<jupyter_code>s2 = df.loc[:,['groove','asymmetry']]
s2.head()<jupyter_output><empty_output><jupyter_text>Create a histogram plot using the first slice, and another histogram plot using the second slice. Be sure to set `alpha=0.75`.<jupyter_code>plt.hist(s1.area, color = 'r', label='area')
plt.hist(s1.perimeter, color = 'b', label='perimeter', alpha = 0.75)
# Display the graphs:
plt.legend()
plt.show()
s2.describe()
s2 = s2.dropna()
plt.hist(s2.groove, color = 'r', normed=False, label='groove')
plt.hist(s2.asymmetry, color = 'b', label='asymmetry', alpha = 0.75)
# Display the graphs:
plt.legend()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14352783366867874, 'fraction_numerical': 0.018779342723004695, 'mean_word_length': 6.612244897959184, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '510267', 'license': 'MIT', 'n_tokens_mistral': 560, 'n_tokens_neox': 536, 'n_words': 134, 'path': 'Module3/Module3 - Lab1.ipynb', 'repo_name': 'Hazici/DAT210x', 'size': '1491'}