We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5229a04 commit 4c66e3fCopy full SHA for 4c66e3f
part-gen-prog/03-data-struct.qmd
@@ -253,10 +253,12 @@ digits_pi[2]
253
```{python series-pandas-2, error = T}
254
# Python is 0 indexed - a list of 11 things goes from 0 to 10
255
digits_pi[0]
256
-digits_pi[11]
+digits_pi[11] # This errors out
257
258
# logical indexing works here too
259
digits_pi[digits_pi > 3]
260
+digits_pi.loc[digits_pi > 3]
261
+
262
# simple multiplication works in a vectorized manner
263
# that is, the whole vector is multiplied at once
264
digits_pi * 2
0 commit comments