Why third option is correct?

Course Name: Python for Trading: Basic, Section No: 8, Unit No: 13, Unit type: Quiz

To my understanding, we should only be able to access the column via index. But the answer says that the third option is also correct. But this means that 'Col_Name' is basically an attribute of 'DataFrame'. Could you please explain?

Many Thanks,
Vishu

Hi Vishnu,



You are correct! The column name is an attribute for the data frame. You can refer to this official documentation for reference.



Hope this helps!