Compare commits
No commits in common. "29a39d35dd7fe7e41c5669a762f855c88b309cd2" and "8fd4add80b8acc24476cff9ed103431e94ca0c22" have entirely different histories.
29a39d35dd
...
8fd4add80b
@ -25,17 +25,119 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 1,
|
"execution_count": 3,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/html": [
|
||||||
|
"<div>\n",
|
||||||
|
"<style scoped>\n",
|
||||||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||||||
|
" vertical-align: middle;\n",
|
||||||
|
" }\n",
|
||||||
|
"\n",
|
||||||
|
" .dataframe tbody tr th {\n",
|
||||||
|
" vertical-align: top;\n",
|
||||||
|
" }\n",
|
||||||
|
"\n",
|
||||||
|
" .dataframe thead th {\n",
|
||||||
|
" text-align: right;\n",
|
||||||
|
" }\n",
|
||||||
|
"</style>\n",
|
||||||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||||||
|
" <thead>\n",
|
||||||
|
" <tr style=\"text-align: right;\">\n",
|
||||||
|
" <th></th>\n",
|
||||||
|
" <th>Unnamed: 0</th>\n",
|
||||||
|
" <th>Id</th>\n",
|
||||||
|
" <th>Expected</th>\n",
|
||||||
|
" <th>Rooms</th>\n",
|
||||||
|
" <th>SqrMeters</th>\n",
|
||||||
|
" <th>Floor</th>\n",
|
||||||
|
" <th>Location</th>\n",
|
||||||
|
" </tr>\n",
|
||||||
|
" </thead>\n",
|
||||||
|
" <tbody>\n",
|
||||||
|
" <tr>\n",
|
||||||
|
" <th>0</th>\n",
|
||||||
|
" <td>0</td>\n",
|
||||||
|
" <td>1</td>\n",
|
||||||
|
" <td>269000</td>\n",
|
||||||
|
" <td>3</td>\n",
|
||||||
|
" <td>55.00</td>\n",
|
||||||
|
" <td>1</td>\n",
|
||||||
|
" <td>Poznań Zawady</td>\n",
|
||||||
|
" </tr>\n",
|
||||||
|
" <tr>\n",
|
||||||
|
" <th>1</th>\n",
|
||||||
|
" <td>1</td>\n",
|
||||||
|
" <td>2</td>\n",
|
||||||
|
" <td>320000</td>\n",
|
||||||
|
" <td>3</td>\n",
|
||||||
|
" <td>79.00</td>\n",
|
||||||
|
" <td>10</td>\n",
|
||||||
|
" <td>Poznań Rataje ul. Orła Bialego</td>\n",
|
||||||
|
" </tr>\n",
|
||||||
|
" <tr>\n",
|
||||||
|
" <th>2</th>\n",
|
||||||
|
" <td>2</td>\n",
|
||||||
|
" <td>3</td>\n",
|
||||||
|
" <td>146000</td>\n",
|
||||||
|
" <td>1</td>\n",
|
||||||
|
" <td>31.21</td>\n",
|
||||||
|
" <td>1</td>\n",
|
||||||
|
" <td>Poznań Nowe Miasto ul. Kawalerka W Nowym Bloku...</td>\n",
|
||||||
|
" </tr>\n",
|
||||||
|
" <tr>\n",
|
||||||
|
" <th>3</th>\n",
|
||||||
|
" <td>3</td>\n",
|
||||||
|
" <td>4</td>\n",
|
||||||
|
" <td>189000</td>\n",
|
||||||
|
" <td>2</td>\n",
|
||||||
|
" <td>44.00</td>\n",
|
||||||
|
" <td>2</td>\n",
|
||||||
|
" <td>Poznań Grunwald Ogrody Jeżyce Centrum Łazarz u...</td>\n",
|
||||||
|
" </tr>\n",
|
||||||
|
" <tr>\n",
|
||||||
|
" <th>4</th>\n",
|
||||||
|
" <td>4</td>\n",
|
||||||
|
" <td>5</td>\n",
|
||||||
|
" <td>480240</td>\n",
|
||||||
|
" <td>2</td>\n",
|
||||||
|
" <td>65.25</td>\n",
|
||||||
|
" <td>1</td>\n",
|
||||||
|
" <td>Poznań ul. Droga Dębińska 19</td>\n",
|
||||||
|
" </tr>\n",
|
||||||
|
" </tbody>\n",
|
||||||
|
"</table>\n",
|
||||||
|
"</div>"
|
||||||
|
],
|
||||||
|
"text/plain": [
|
||||||
|
" Unnamed: 0 Id Expected Rooms SqrMeters Floor \\\n",
|
||||||
|
"0 0 1 269000 3 55.00 1 \n",
|
||||||
|
"1 1 2 320000 3 79.00 10 \n",
|
||||||
|
"2 2 3 146000 1 31.21 1 \n",
|
||||||
|
"3 3 4 189000 2 44.00 2 \n",
|
||||||
|
"4 4 5 480240 2 65.25 1 \n",
|
||||||
|
"\n",
|
||||||
|
" Location \n",
|
||||||
|
"0 Poznań Zawady \n",
|
||||||
|
"1 Poznań Rataje ul. Orła Bialego \n",
|
||||||
|
"2 Poznań Nowe Miasto ul. Kawalerka W Nowym Bloku... \n",
|
||||||
|
"3 Poznań Grunwald Ogrody Jeżyce Centrum Łazarz u... \n",
|
||||||
|
"4 Poznań ul. Droga Dębińska 19 "
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 3,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"# ODPOWIEDZ:\n",
|
"df = pd.read_csv(\"./mieszkania.csv\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"\n",
|
"df.head()"
|
||||||
"\n",
|
|
||||||
"#df = pd.read_csv(\"./mieszkania.csv\")\n",
|
|
||||||
"\n",
|
|
||||||
"#df.head()"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -47,16 +149,30 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": 2,
|
"execution_count": 4,
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"2 2208\n",
|
||||||
|
"3 1553\n",
|
||||||
|
"1 620\n",
|
||||||
|
"4 523\n",
|
||||||
|
"5 81\n",
|
||||||
|
"6 13\n",
|
||||||
|
"10 1\n",
|
||||||
|
"7 1\n",
|
||||||
|
"Name: Rooms, dtype: int64"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 4,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"# ODPOWIEDZ:\n",
|
"df['Rooms'].value_counts()"
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"#df['Rooms'].value_counts()"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -86,19 +202,15 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"# ODPOWIEDZ:\n",
|
"def find_borough(desc):\n",
|
||||||
"\n",
|
" dzielnice = ['Stare Miasto',\n",
|
||||||
"\n",
|
" 'Wilda',\n",
|
||||||
"\n",
|
" 'Jeżyce',\n",
|
||||||
"# def find_borough(desc):\n",
|
" 'Rataje',\n",
|
||||||
"# dzielnice = ['Stare Miasto',\n",
|
" 'Piątkowo',\n",
|
||||||
"# 'Wilda',\n",
|
" 'Winogrady',\n",
|
||||||
"# 'Jeżyce',\n",
|
" 'Miłostowo',\n",
|
||||||
"# 'Rataje',\n",
|
" 'Dębiec']"
|
||||||
"# 'Piątkowo',\n",
|
|
||||||
"# 'Winogrady',\n",
|
|
||||||
"# 'Miłostowo',\n",
|
|
||||||
"# 'Dębiec']"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -153,10 +265,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"# ODPOWIEDZ:\n",
|
"df[df['Rooms'] == 2]['Expected'].mean()"
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"#df[df['Rooms'] == 2]['Expected'].mean()"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -185,11 +294,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"source": [
|
||||||
"# ODPOWIEDZ:\n",
|
"df.query('Floor == 13')['Location']"
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"\n",
|
|
||||||
"#df.query('Floor == 13')['Location']"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -209,7 +314,7 @@
|
|||||||
],
|
],
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"kernelspec": {
|
"kernelspec": {
|
||||||
"display_name": "Python 3",
|
"display_name": "Python 3 (ipykernel)",
|
||||||
"language": "python",
|
"language": "python",
|
||||||
"name": "python3"
|
"name": "python3"
|
||||||
},
|
},
|
||||||
@ -223,7 +328,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.8.3"
|
"version": "3.9.13"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nbformat": 4,
|
"nbformat": 4,
|
||||||
|
Loading…
Reference in New Issue
Block a user