pandas index_col=“datetime” makes df['datetime'] unavailable

pandas index_col=“datetime” makes df['datetime'] unavailable

The title says it all. The following bit of pseudo-code returns the following error:

The title says it all. The following bit of pseudo-code returns the following error:

df = pd.read_sql(query, conn, parse_dates=["datetime"],
                             index_col="datetime")
df['datetime']

I get :

Exception in thread Thread-1:
 Traceback (most recent call last):
   File "C:\Users\admin\.virtualenvs\EnkiForex-ey09TNOL\lib\site-packages\pandas\core\indexes\base.py", line 2656, in get_loc
     return self._engine.get_loc(key)
   File "pandas\_libs\index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
   File "pandas\_libs\index.pyx", line 132, in pandas._libs.index.IndexEngine.get_loc
   File "pandas\_libs\hashtable_class_helper.pxi", line 1601, in pandas._libs.hashtable.PyObjectHashTable.get_item
   File "pandas\_libs\hashtable_class_helper.pxi", line 1608, in pandas._libs.hashtable.PyObjectHashTable.get_item
 KeyError: 'datetime'

Am I misunderstanding what's going on by indexing the datetime col? I can access all the other columns normally though.

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top Python Development Companies | Hire Python Developers

After analyzing clients and market requirements, TopDevelopers has come up with the list of the best Python service providers. These top-rated Python developers are widely appreciated for their professionalism in handling diverse projects. When...

Python GUI Programming Projects using Tkinter and Python 3

Python GUI Programming Projects using Tkinter and Python 3

Guide to Python Programming Language

Guide to Python Programming Language