Here's a link to the Pandas documentation for this method: https://github.com/pandas-dev/pandas/blob/main/pandas/core/indexing.py#L271.
I've always understood that the syntax for wrapping paramaters of a function are parentheses brackets "()", however in Pandas there's a number of methods, such as .loc that you use square bracket.
How does the Pandas module achieve that? I can see loc is a method of the IndexingMixin class, but still a bit confused on why .loc isn't called with parentheses "()". Is the use of square bracket arbitrary, and could you assign any character to call the method?
Is there a link in the Python documentation somewhere that I can get more insight into?