- Daily Dose of Data Science
- Posts
- Are You Sure You Are Using The Correct Pandas Terminologies?
Are You Sure You Are Using The Correct Pandas Terminologies?
If not, let's revisit.

Many Pandas users use the dataframe subsetting terminologies incorrectly. So let's spend a minute to get it straight.
ππππππππππ means extracting value(s) from a dataframe. This can be done in four ways:
1) We call it πππππππππ when we extract one or more of its πππππππ based on index location or name. The output contains some columns and all rows.

2) We call it πππππππ when we extract one or more of its ππππ based on index location or name. The output contains some rows and all columns.

3) We call it ππππππππ when we extract both ππππ and πππππππ based on index location or name.

4) We call it π ππππππππ when we extract ππππ and πππππππ based on conditions.

Of course, there are many other ways you can perform these four operations.
Hereβs a comprehensive Pandas guide I prepared once: Pandas Map. Please refer to the βDF Subsetβ branch to read about various subsetting methods :)
π Tell me you liked this post by leaving a heart react π€.
π If you love reading this newsletter, feel free to share it with friends!
Find the code for my tips here: GitHub.
Reply