Skip to content

Commit ffeffbc

Browse files
committed
Fix problems in the update
1 parent ed9bf12 commit ffeffbc

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

pandas-intro/pandas_intro.ipynb

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
"cell_type": "markdown",
2626
"metadata": {},
2727
"source": [
28-
"### Installing Pandas"
28+
"### Installing Dependencies"
2929
]
3030
},
3131
{
3232
"cell_type": "markdown",
3333
"metadata": {},
3434
"source": [
3535
"```console\n",
36-
"$ python -m pip install pandas\n",
36+
"$ python3 -m pip install requests pandas matplotlib\n",
3737
"```"
3838
]
3939
},
@@ -42,7 +42,7 @@
4242
"metadata": {},
4343
"source": [
4444
"```console\n",
45-
"$ conda install pandas\n",
45+
"$ conda install requests pandas matplotlib\n",
4646
"```"
4747
]
4848
},
@@ -197,7 +197,7 @@
197197
"outputs": [],
198198
"source": [
199199
"import numpy as np\n",
200-
"nba.describe(include=np.object)"
200+
"nba.describe(include=object)"
201201
]
202202
},
203203
{
@@ -230,12 +230,11 @@
230230
"source": [
231231
"nba[\"fran_id\"].value_counts()\n",
232232
"# Expected:\n",
233-
"# Name: team_id, Length: 104, dtype: int64\n",
234233
"# Lakers 6024\n",
235234
"# Celtics 5997\n",
236235
"# Knicks 5769\n",
237236
"\n",
238-
"# Huskies 60\n",
237+
"# Falcons 60\n",
239238
"# Name: fran_id, dtype: int64"
240239
]
241240
},
@@ -484,8 +483,8 @@
484483
"city_data.values\n",
485484
"# Expected:\n",
486485
"# array([[4.2e+03, 5.0e+00],\n",
487-
"# [6.5e+03, 8.0e+00],\n",
488-
"# [8.0e+03, nan]])"
486+
"# [6.5e+03, 8.0e+00],\n",
487+
"# [8.0e+03, nan]])"
489488
]
490489
},
491490
{
@@ -922,7 +921,7 @@
922921
"current_decade = nba[nba[\"year_id\"] > 2010]\n",
923922
"current_decade.shape\n",
924923
"# Expected:\n",
925-
"# (12658, 23)"
924+
"# (12658, 24)"
926925
]
927926
},
928927
{
@@ -934,7 +933,7 @@
934933
"games_with_notes = nba[nba[\"notes\"].notnull()]\n",
935934
"games_with_notes.shape\n",
936935
"# Expected:\n",
937-
"# (5424, 23)"
936+
"# (5424, 24)"
938937
]
939938
},
940939
{
@@ -946,7 +945,7 @@
946945
"ers = nba[nba[\"fran_id\"].str.endswith(\"ers\")]\n",
947946
"ers.shape\n",
948947
"# Expected:\n",
949-
"# (27797, 23)"
948+
"# (27797, 24)"
950949
]
951950
},
952951
{
@@ -1111,7 +1110,7 @@
11111110
"df = nba.copy()\n",
11121111
"df.shape\n",
11131112
"# Expected:\n",
1114-
"# (126314, 23)"
1113+
"# (126314, 24)"
11151114
]
11161115
},
11171116
{
@@ -1130,7 +1129,7 @@
11301129
"df[\"difference\"] = df.pts - df.opp_pts\n",
11311130
"df.shape\n",
11321131
"# Expected:\n",
1133-
"# (126314, 24)"
1132+
"# (126314, 25)"
11341133
]
11351134
},
11361135
{
@@ -1164,16 +1163,17 @@
11641163
"# Expected:\n",
11651164
"# <class 'pandas.core.frame.DataFrame'>\n",
11661165
"# RangeIndex: 126314 entries, 0 to 126313\n",
1167-
"# Data columns (total 24 columns):\n",
1166+
"# Data columns (total 25 columns):\n",
11681167
"# gameorder 126314 non-null int64\n",
11691168
"\n",
11701169
"# location 126314 non-null object\n",
11711170
"# result 126314 non-null object\n",
11721171
"# forecast 126314 non-null float64\n",
11731172
"# notes 5424 non-null object\n",
1173+
"# date_played 126314 non-null datetime64[ns]\n",
11741174
"# difference 126314 non-null int64\n",
1175-
"# dtypes: float64(6), int64(8), object(10)\n",
1176-
"# memory usage: 23.1+ MB"
1175+
"# dtypes: datetime64[ns](1), float64(6), int64(8), object(10)\n",
1176+
"# memory usage: 24.1+ MB"
11771177
]
11781178
},
11791179
{
@@ -1191,7 +1191,7 @@
11911191
"source": [
11921192
"df.shape\n",
11931193
"# Expected:\n",
1194-
"# (126314, 24)"
1194+
"# (126314, 25)"
11951195
]
11961196
},
11971197
{
@@ -1204,7 +1204,7 @@
12041204
"df.drop(elo_columns, inplace=True, axis=1)\n",
12051205
"df.shape\n",
12061206
"# Expected:\n",
1207-
"# (126314, 20)"
1207+
"# (126314, 21)"
12081208
]
12091209
},
12101210
{
@@ -1310,7 +1310,7 @@
13101310
"rows_without_missing_data = nba.dropna()\n",
13111311
"rows_without_missing_data.shape\n",
13121312
"# Expected:\n",
1313-
"# (5424, 23)"
1313+
"# (5424, 24)"
13141314
]
13151315
},
13161316
{
@@ -1322,7 +1322,7 @@
13221322
"data_without_missing_columns = nba.dropna(axis=1)\n",
13231323
"data_without_missing_columns.shape\n",
13241324
"# Expected:\n",
1325-
"# (126314, 22)"
1325+
"# (126314, 23)"
13261326
]
13271327
},
13281328
{
@@ -1565,9 +1565,9 @@
15651565
"name": "python",
15661566
"nbconvert_exporter": "python",
15671567
"pygments_lexer": "ipython3",
1568-
"version": "3.9.1"
1568+
"version": "3.9.2"
15691569
}
15701570
},
15711571
"nbformat": 4,
1572-
"nbformat_minor": 2
1572+
"nbformat_minor": 4
15731573
}

0 commit comments

Comments
 (0)