This is a very basic question, but I believe it’ll help someone out there (including me).
When a data frame is created and we want to reference the column name, we can do so by the following:
df[“Column Name Example”]
However, we can also reference a column name by the ‘dot’ method, such as this example:
df.column_name_example
The second option works because of the underscores within the column name. What if the column name has spaces? How do we use the ‘dot’ method to reference column names?