Skip to content

Commit

Permalink
Donot use hard-coded indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
aquaraga committed May 11, 2017
1 parent baf920a commit 8c1d985
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 02_Filtering_&_Sorting/Euro12/Exercises_with_Solutions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@
}
],
"source": [
"euro12[5:7]"
"euro12[euro12.Team.str.startswith('G')]"
]
},
{
Expand Down Expand Up @@ -2170,7 +2170,7 @@
"source": [
"# .loc is another way to slice, using the labels of the columns and indexes\n",
"\n",
"euro12.loc[[3,7,12] , ['Team','Shooting Accuracy']] "
"euro12.loc[euro12.Team.isin(['England', 'Italy', 'Russia']), ['Team','Shooting Accuracy']]"
]
}
],
Expand Down

0 comments on commit 8c1d985

Please sign in to comment.