<jupyter_start><jupyter_text>Reported crimes per Community Area by Primary Type<jupyter_code>crime_org= pd.DataFrame(crimes.pivot_table(crimes,index=["Community Area", "Primary Type"]))
crime_org

crime_data = pd.DataFrame(crimes.pivot_table(values=["ID"], index=["Community Area", "Primary Type", "Date"], aggfunc=np.sum))
crime_data<jupyter_output><empty_output><jupyter_text>Number of Reported Crimes per Commuity Area<jupyter_code>#1) group by community area
#2) get numbers of crime type per community area

crime_area= pd.DataFrame(crimes.groupby("Community Area")["ID"].count())
crime_area<jupyter_output><empty_output><jupyter_text>Number of Reported Crimes per Primary Type<jupyter_code>crime_type= pd.DataFrame(crimes.groupby("Primary Type")["ID"].count())
crime_type<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13011152416356878, 'fraction_numerical': 0.0024783147459727386, 'mean_word_length': 10.882352941176471, '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': '4406', 'license': 'MIT', 'n_tokens_mistral': 289, 'n_tokens_neox': 276, 'n_words': 54, 'path': 'jupyter_notebooks/Crime Data.ipynb', 'repo_name': 'jessicagtz/Project-2-Chicago-Communities', 'size': '807'}