I have a question and want to get an understanding of it, so the question is in pandas we have two indexers (loc, iloc) that we can use to select specific columns and rows, and the loc is labeled based on data selecting method which means that we have to pass the name of the row or column which we want to select, and iloc is an indexed based selecting method which means that we have to pass integer index in the method to select a specific row/column, so if I have the below data frame with columns names as a "string"
I can use the loc as below:
so if I rename the column to a number and the type of name of the column becomes 'integer' as below:
and using loc if I provide the name of the column that types integer why does this work without errors:
I mean if loc for labeled data why it works on column names as numbers 0, 1, 2, 3, with type "INTEGER"?