Skip to content

Commit 3a5437a

Browse files
author
craigsdennis
committed
Reviewpass
1 parent 87ef93a commit 3a5437a

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

s2n07-handling-missing-and-duplicated-data.ipynb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
"transactions = pd.read_csv(os.path.join('data', 'transactions.csv'), index_col=0)\n",
3838
"requests = pd.read_csv(os.path.join('data', 'requests.csv'), index_col=0)\n",
3939
"\n",
40-
"# Perform the merge from the previous notebook (s2n6-combining-dataframes.ipynb)\n",
40+
"# Perform the merge from the previous notebook \n",
41+
"# (s2n06-combining-dataframes.ipynb)\n",
4142
"successful_requests = requests.merge(\n",
4243
" transactions,\n",
4344
" left_on=['from_user', 'to_user', 'amount'], \n",
@@ -84,7 +85,8 @@
8485
"# Let's get our records sorted chronologically\n",
8586
"successful_requests.sort_values('request_date', inplace=True) \n",
8687
"\n",
87-
"# And then we'll drop dupes keeping only the last one. Note the call to inplace \n",
88+
"# And then we'll drop dupes keeping only the last one. \n",
89+
"# Note the use of the inplace keyword\n",
8890
"successful_requests.drop_duplicates(('from_user', 'to_user', 'amount'), keep='last', inplace=True)\n",
8991
"\n",
9092
"# Statement from previous notebook\n",
@@ -226,7 +228,8 @@
226228
}
227229
],
228230
"source": [
229-
"# Create a boolean array where we check to see if the label (username) is in the `from_user` Series.\n",
231+
"# Create a boolean array where we check to see if the label (username) \n",
232+
"# is in the `from_user` Series.\n",
230233
"made_request_index = users.index.isin(requests.from_user)\n",
231234
"# This will get us a list of all users who **have** made a request\n",
232235
"users[made_request_index].head()"

0 commit comments

Comments
 (0)