Skip to content

Commit 804bac5

Browse files
authored
Merge pull request #238 from AaltoSciComp/eglerean-patch-1
Fixing exercise 1 solution
2 parents b2eaaed + 0d36331 commit 804bac5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/pandas.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Exercises 1
176176
.. solution::
177177

178178
- Mean age of the first 10 passengers: ``titanic.iloc[:10,:]["Age"].mean()``
179-
or ``titanic.loc[:9,"Age"].mean()`` or ``df.iloc[:10,5].mean()``.
179+
or ``titanic.loc[:"Nasser, Mrs. Nicholas (Adele Achem)","Age"].mean()`` or ``titanic.iloc[:10,4].mean()``.
180180
- Survival rate among passengers over and under average age:
181181
``titanic[titanic["Age"] > titanic["Age"].mean()]["Survived"].mean()`` and
182182
``titanic[titanic["Age"] < titanic["Age"].mean()]["Survived"].mean()``.

0 commit comments

Comments
 (0)