Concept Flow - loc vs iloc mental model
Start with DataFrame
Use loc: label-based
Select rows/cols by labels
Use iloc: position-based
Select rows/cols by integer index
Return selected data
End
The flow shows starting with a DataFrame, then choosing loc for label-based selection or iloc for position-based selection, and finally returning the selected data.