Skip to content

Commit e0561af

Browse files
committed
update project 1
1 parent 988ae9b commit e0561af

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

project 1.ipynb

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
"id": "ecf460cf",
1414
"metadata": {},
1515
"source": [
16-
"We are going to analyze the sales of real estates in Manhattan in New York from November 2024 to December. \n",
17-
"Using a rolling sales data from https://www.nyc.gov/site/finance/property/property-rolling-sales-data.page, we are going to compute the mean, median and mode of the sale price. "
16+
"We are going to analyze real estate sales in Manhattan for the period of November 2024 to December. \n",
17+
"Using the rolling sales data from https://www.nyc.gov/site/finance/property/property-rolling-sales-data.page, we will compute the mean, median and mode of the sale price. "
1818
]
1919
},
2020
{
2121
"cell_type": "markdown",
2222
"id": "2aac3287",
2323
"metadata": {},
2424
"source": [
25-
"At first, we are going to download a data file. The NYC Department of Finance provides a only excel data, so you should convert it into csv file before you read the file in Python."
25+
"First, we will download the data file. The NYC Department of Finance provides only Excel data, so we will convert it into a CSV file before reading the file in Python."
2626
]
2727
},
2828
{
@@ -61,7 +61,7 @@
6161
"id": "3d23dbd5",
6262
"metadata": {},
6363
"source": [
64-
"Then, we are going to compute the mean, median and mode of all prices listed. Before moving on, we should remove 0 in the list."
64+
"Then, we will compute the mean, median and mode of all listed prices. Before performing this calculations, we must filter out entries with a price of 0. These $0 sales are not market-rate transactions and would distort the results, so they will be excluded from the analysis."
6565
]
6666
},
6767
{
@@ -82,7 +82,7 @@
8282
}
8383
],
8484
"source": [
85-
"# clean your data(remove \",\" in the column and change data type)\n",
85+
"# clean your data\n",
8686
"df[\"SALE PRICE\"] = pd.to_numeric(df[\"SALE PRICE\"].str.replace(\",\",\"\"))\n",
8787
"\n",
8888
"# remove 0\n",
@@ -220,6 +220,14 @@
220220
" print(f\"{key}:\" f\"{bar}\", f\"{stats_data[key]}\")\n",
221221
"\n"
222222
]
223+
},
224+
{
225+
"cell_type": "markdown",
226+
"id": "286d03ad",
227+
"metadata": {},
228+
"source": [
229+
"As you can see, the average of the sales price is about three times higher than the median.This happens because the mean is highly affected by outliers (a few extremely large values), while the median is not. In this case, outliers can be the penthouses, commercial buildings, and skyscrapers that sell for $50 million, $100 million, or more."
230+
]
223231
}
224232
],
225233
"metadata": {

0 commit comments

Comments
 (0)