uc-python / intro-python-datasci

Intro to Python for Data Science Workshop
https://uc-python.github.io/intro-python-datasci/
MIT License
32 stars 23 forks source link

Remove bracket-int notation in Subsetting&Filtering #10

Closed eswan18 closed 5 years ago

eswan18 commented 5 years ago

In the subsetting and filtering notebook, we show a way of selecting rows by using bracket notation on the dataframe directly:

image

However, it is not only misleading (as pointed out above), but it is actually ambiguous – in certain cases (many, I think), it will select columns and not rows.

image

Note that in this case, passing an integer selected a column (not a row). For clarity and simplicity, I believe we should not even introduce this syntax as an option.

markroepke commented 5 years ago

Good catch. I'll remove it.

eswan18 commented 5 years ago

Looks good