@@ -279,7 +279,7 @@ surveys_df[0:3]
279279>
280280> _Remember: R begins indexing lists at 1._
281281>
282- <!-- > > ## Solution
282+ > > ## Solution
283283> >
284284> > With the same list:
285285> > `['A','B','C','D','E','F','G','H','I','J']`,
@@ -316,7 +316,7 @@ surveys_df[0:3]
316316> > This is ignored when you use the syntax
317317> > `x[0:5]`, and the elements in `1` through
318318> > `5` are returned.
319- > {: .solution} -->
319+ > {: .solution}
320320{: .challenge}
321321
322322
@@ -326,7 +326,7 @@ surveys_df[0:3]
326326> Combine selecting a subset with column headings and slice syntax for rows. Get
327327> every 5th row for rows 20-60, from the columns `plot_id`, `species_id`, and `sex`.
328328>
329- <!-- > > ## Solution
329+ > > ## Solution
330330> >
331331> > ~~~
332332> > surveys_df[['plot_id', 'species_id','sex']][20:61:5]
@@ -346,7 +346,7 @@ surveys_df[0:3]
346346> > 60 23 DM M
347347> > ~~~
348348> > {: .output}
349- > {: .solution} -->
349+ > {: .solution}
350350{: .challenge}
351351
352352## Changing Values in a DataFrame
@@ -611,7 +611,7 @@ surveys_df.loc[1:4, ['record_id','month']]
611611>
612612> 2. Use `.iloc[]` to view the same thing.
613613>
614- <!-- > > ## Solution
614+ > > ## Solution
615615> >
616616> > ~~~
617617> > # 1
@@ -621,7 +621,7 @@ surveys_df.loc[1:4, ['record_id','month']]
621621> > surveys_df.iloc[1:6:2, [5,6]]
622622> > ~~~
623623> > {: .python}
624- > {: .solution} -->
624+ > {: .solution}
625625{: .challenge}
626626
627627
@@ -675,7 +675,7 @@ surveys_df[(surveys_df.sex == 'M') & (surveys_df.year <= 1985)]
675675> the year 1999 and that contain weight values less than or equal to 8. How
676676> many rows did you end up with?
677677>
678- <!-- > > ## Solution
678+ > > ## Solution
679679> >
680680> > ~~~
681681> > surveys_df[(surveys_df.weight <= 8.0) & (surveys_df.year == 1999)]
@@ -697,7 +697,7 @@ surveys_df[(surveys_df.sex == 'M') & (surveys_df.year <= 1985)]
697697> > 29905 4.0
698698> > ~~~
699699> > {: .output}
700- > {: .solution} -->
700+ > {: .solution}
701701{: .challenge}
702702
703703## Iterating Over a DataFrame
0 commit comments