title: Accessing Pandas column using squared brackets vs using a dot (like an attribute)
body: <p>In both the bellow cases:</p>
  <pre><code>import pandas
  
  d = {'col1': 2, 'col2': 2.5}
  df = pandas.DataFrame(data=d, index=[0])
  
  print(df['col2'])
  print(df.col2)
  </code></pre>
  <p>Both methods can be used to index on a column and yield the same result, so is there any difference between them?</p>