<jupyter_start><jupyter_text>read data<jupyter_code>df=pd.read_csv('https://github.com/prasertcbs/tutorial/raw/master/mpg.csv')
df.head()<jupyter_output><empty_output><jupyter_text>explore data<jupyter_code>df.cty.plot(kind='box');
df.hist();
df.cty.hist();
df.cty.hist();
df.cty.hist(bins=20);
df[['cty', 'hwy']].hist(grid=False, color='orange', sharex=True, sharey=True);
df[['cty', 'hwy']].plot.hist(alpha=.5)
df[['cty', 'hwy']].plot.hist();
df.cty.plot.density();
df.cty.plot.kde();
df.sample(10)
df['class'].value_counts()
df['class'].value_counts().plot.bar()
df['class'].value_counts().plot.barh(color='orange')
df.cty.mean()
df['class'].value_counts().plot.barh(color='.7')
df['class'].value_counts().sort_values().plot.barh(color='.7')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.25839793281653745, 'fraction_numerical': 0.00904392764857881, 'mean_word_length': 9.064935064935066, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 1, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '356440', 'license': 'MIT', 'n_tokens_mistral': 347, 'n_tokens_neox': 339, 'n_words': 26, 'path': 'pandas_viz_histogram.ipynb', 'repo_name': 'R1SE23/learn_numpy', 'size': '774'}