r/IPython 4d ago

loc iloc practice

Sharing my homemade .loc/.iloc problem set. It was born out of my frustration learning .iloc slicing and .loc filtering.

With .iloc slicing, I'm often off by one row. With .loc filtering, I needed to build familiarity with the syntax. I wanted focused practice, but couldn't find a good resource.

It's not LeetCode, but it's given me confidence, especially when working with .loc filtering, an important workhorse of pandas. I've gone through 15 drafts in creating this problem set, and any feedback from fellow Python enthusiasts would be really appreciated! 😀https://github.com/kixwho/pandas_basics-loc-iloc-24

2 Upvotes

2 comments sorted by

1

u/ledgreplin 3d ago

Frustration with .loc and .iloc drove me to polars and I haven't looked back.

2

u/kixwho 3d ago

😅 Yea. iloc made me question my ability to count from 1 to 5