hello. In the case that a dataframe has a column that bears the same name as a row, which does the computer take as default.
It really depends on what syntax you use. Let’s look at an example dataframe:
>>> df a b b 1 4 c 2 5 d 3 6
We’ll use brackets select data:
>>> df['b'] b 4 c 5 d 6 Name: b, dtype: object
You can see that we got a series with three items, the column
Now, let’s use the
>>> df.loc['b'] a 1 b 4 Name: b, dtype: object
We get a series with two items, the row
As you can see, depending on the context, there are different defaults. If there’s a particular syntax you’re interested in, please let me know and I’d be happy to help you on this.