Getting the value of particular column when its only one row in pandas dataframe
If you have a white space in your " open" column, just rename it by df = df.rename(columns={' open':'open'})
I sometimes prefer to call a specific pandas column using this df["open"] and press "Tab" for the auto-complete (in Jupyter Notebook or in Vscode). That way I am aware of any concealed typos such as that whitespace which you have
Below is the dataframe:





date
open




26
15-09-21
406.5




Now I need the value of open so I tried:- print(df.open)
It gave error:

AttributeError: 'DataFrame' object has no attribute 'open'

column types are as follow: print(df.dtypes)

date ---->           object
open ---->         float64