Why are label-based slices inclusive of the endpoint in pandas?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks why pandas .loc slices include the stop label while Python slicing and .iloc exclude it. It tests understanding of labels versus positions, behavior with missing endpoints and unsorted or duplicate indexes, and the practical effects on date ranges and time windows.