python - Why/How does Pandas use square brackets with .loc and .iloc? -


this question has answer here:

so .loc , .iloc not typical functions. somehow use [ , ] surround arguments comparable normal array indexing. however, have never seen in library (that can think of, maybe numpy i'm blanking on), , have no idea how technically works/is defined in python code.

are brackets in case syntactic sugar function call? if so, how 1 make arbitrary function use brackets instead of parenthesis? otherwise, special use/defintion pandas?

thanks.

underneath covers, both using __setitem__ , __getitem__ functions.


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -