<jupyter_start><jupyter_text>Pandas Demo Grab some data from data.gov and plotWe can grab any Excel file and read it natively with Pandas if we have `pyopenxl` installed into our environment.  The following line will allow matplotlib to render the plots inline<jupyter_code>%pylab inline
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt<jupyter_output><empty_output><jupyter_text>Notice we can start at any row we want in the file<jupyter_code>enforce = pd.read_excel('closedByEnforcement_FY2010_04-26-2013.xlsx', header=9)
enforce.columns
len(enforce)
enforce
enforce.dtypes
rcParams['figure.figsize'] = 10, 5
enforce['Subject Type'].value_counts()<jupyter_output><empty_output><jupyter_text>Create a quick bar chart to view the data<jupyter_code>enforce['Subject Type'].value_counts().plot(kind='bar')
close_date = enforce['Close Date']<jupyter_output><empty_output><jupyter_text>Plot timeseries data<jupyter_code>close_date.value_counts().plot()
close_date.value_counts()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0935672514619883, 'fraction_numerical': 0.015594541910331383, 'mean_word_length': 8.422018348623853, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '168149', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 363, 'n_tokens_neox': 347, 'n_words': 89, 'path': 'notebooks/Pandas Demo.ipynb', 'repo_name': 'sixfeetup/Sept2018LunchAndLearn_CSV', 'size': '1026'}