Solution 8.1
Please use the following steps to complete the activity:
- Open a new Jupyter notebook.
- Import the pandas, numpy, and matplotlib packages:
import pandas as pd import numpy as np import matplotlib.pyplot as plt
- Load the CSV file as a DataFrame:
file_url = 'PUF2020final_v1coll.csv' data_frame = pd.read_csv(file_url)
- Import the pandas, numpy, and matplotlib packages:
data_frame = data_frame[["REGION", "SQFT", "BEDROOMS", "PRICE"]]
- Display the first 10 rows of the DataFrame:
data_frame.head(10)
The output will be as follows:
- Plot a histogram chart for PRICE:
data_frame.PRICE.plot(kind = 'hist');
The output will be as follows:
It seems that most of the properties have a sale price centered around 50k-150k. There are also a few outliers with a high sale price of over...