<jupyter_start><jupyter_text>__This assignment is worth up to 15 POINTS to your grade total if you do it and turn it in on time.  Late assignments will lose 15%.__| Points Possible | Due Date ||:---------------:|:--------:|| 15 | Wednesday, Sep. 28 @ Midnight|  OBJECTIVE* Learn how to use Pandas for data ingest, manipulation and summarization.* Learn to perform a simple exploratory data analysis to plot data and visualize outcomes.* Understand how to use and interpret Pearson-_r_ for correlation.* Implement $k$-Nearest Neighbors and see a distance metric in action on real data.  WHAT TO TURN INYou are being encouraged to turn the assignment in using the provided Jupyter Notebook.  To do so, clone the repository and modify the `Homework1.ipynb` file in the `HOMEWORK/01` directory.Turn in a copy of a ipynb file OR a PDF or Word Document to Blackboard with the answers to the questions labeled with the &167; sign.  RESOURCES Datasets| Dataset | Summary | Size ||---------|---------|------||[Salt Lake City Water Usage Jan-July 2016](http://www.civicdata.io/dataset/slc_water_usage_1/resource/a2bc8285-d9ef-45ca-ae86-bf735bc5011a) | Real data that includes water usage for various property types, connection counts, etc. | > 40K instances, < 10 features ||[Sacramento Real Estate transactions, May 15-21, 2008](http://samplecsvs.s3.amazonaws.com/Sacramentorealestatetransactions.csv).  Also found [archived here in the repo](./Sacramentorealestatetransactions.csv).| Sacramento transcation data from real estate properties sold in a single week in 2008.  Includes latitude, longitude, prices, addresses, and basic property characteristics ( beds, square footage, etc.) | > 900 instances, < 10 features | Pandashttp://pandas.pydata.org/ Jupyter Notebookshttp://jupyter.org Code You might need to use the following at the beginning of your Jupyter notebook:```python%matplotlib inlineimport numpy as npimport requestsimport pandas as pdimport numpy as np```  HOW TO COMPLETE THIS ASSIGNMENT / ASSIGNMENT DETAILS  PART 1 / Python PandasFor this part you will need to load and analyze data using [Pandas](http://pandas.pydata.org). Familiarize yourself with the dataset from the [spatialkey.com](https://support.spatialkey.com/spatialkey-sample-csv-data/) website.  In particular, we will be working with the dataset here:![sacramento dataset](./spatialkey_screenshot01.PNG)   &167; Write the Python code to load the [CSV file from spatialkey](http://samplecsvs.s3.amazonaws.com/Sacramentorealestatetransactions.csv) directly into a Pandas dataframe.   * You may need to familiarize yourself with the [IO Tools](http://pandas.pydata.org/pandas-docs/stable/io.html) functions of Pandas. * Load the file to your local file system where the running code exists (e.g. the CSV file should exist in the same location as your code or notebook). * Turn in the fragment of code that does this.<jupyter_code>import pandas as pd
print "my answer"<jupyter_output>my answer<jupyter_text>&167;  Compute the price per square foot for all properties.  Add this data back into the dataframe.   * See the documentation on [concatening objects](http://pandas.pydata.org/pandas-docs/stable/merging.htmlconcatenating-objects). * Turn in the code that does this, and show the results of `head()` and `tail()` on the new dataframe.<jupyter_code>def ppsf(some_number, another_number):
    return some_number / (another_number * 1.7)

ppsf(20, 30)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09401214926236622, 'fraction_numerical': 0.021405843216661846, 'mean_word_length': 4.622764227642277, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, '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': 1}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '536889', 'license': 'MIT', 'n_tokens_mistral': 1060, 'n_tokens_neox': 968, 'n_words': 411, 'path': 'ds/Homework1.ipynb', 'repo_name': 'ganesh-95/machine-learning', 'size': '3457'}