Course Name: Python for Trading: Basic, Section No: 6, Unit No: 4, Unit type: Notebook
Instead of nifty csv, i am having infy csv and i am able to print the infy.head().
import pandas as pd
infy = pd.read_csv ('infy.csv')
infy.head ()
but when i am calling BB function,
Calling Bollinger Bands for 'Nifty' index price data
n = 21 # We have kept the window of the moving average as 21 days
Calling the Bollinger Bands function cerated by us
infy_bb = Bollinger_Bands(infy, n)
infy_bb.tail()
i am getting key close error
KeyError: 'Close' The above exception was the direct cause of the following exception: KeyError Traceback (most recent call last) <ipython-input-7-eaa8b1711106> in <module> 4 5 # Calling the Bollinger Bands function cerated by us ----> 6 infy_bb = Bollinger_Bands(infy, n) 7 8 infy_bb.tail()