Short version
For pandas Dataframe.__getitem__() , what are the valid input data (input types really) and what are the results of the result?
More details
Description of the problem
I would like to write code that makes full use of DataFrame [], essentially a Dataframe.__getitem__() . To this end, I would like to receive information about the I / O results at the level of details found on the API page, although it is not available for this method.
What has been done so far to resolve it
I searched for the full specification for this function on the Pandas API page. Although many other methods are documented, there is no Dataframe.__getitem__() .
I also reviewed the tutorial , but I do not consider it an attempt to be exhaustive.
I looked at the source code for the Dataframe.__getitem__() (first skip this as described in my own answer below). Obviously, many different types can be taken as input, but reverse engineering the code to determine what happens when each of these types is passed seems to not be the intended way to master this method.
Additional background
Pandas is one of the most important libraries in the role of Python in science and statistics, the DataFrame is perhaps the most central object in Pandas, and the [] operator is arguably the most central method in the DataFrame. Therefore, in fact, the answer to the question that I posted here has a very high pedagogical value, and not just usefulness for me.
source share