ValueError: The truth value of a DataFrame is ambiguous - NIFTY Case Study Week 9

I am getting error while executing the code. Unable to figure out.

Hi @Alok_Trivedi,
Can you rerunning these cells in sequence first, and please share a screenshot of the error by expanding those 2 hidden frames above the error message so that we can take a look.

You might have read nifty as pd.DataFrame (see output of nifty.head(), it has column name) instead of as a pd.Series
Refer class workbook, instead of using this:

nifty = pd.read_csv(‘nifty.csv’, index_col=0)

use this:

nifty = pd.read_csv(‘nifty.csv’, index_col=0).iloc[:, 0]

Thanks.
nifty = pd.read_csv(‘nifty.csv’, index_col=0).iloc[:, 0]
it worked.