Questions & Answers

Showing things that are in my Quandl Index as not in Quandl Index

In my quandl / Pandas python file, I am trying to add 2 new indexes which I have done, but on the error page it shows that it is not in the df so need to fix:

My code The error code

I tried to get my new indexes which are : df['HL_PCT'] = (df['High'] - df['Low'] )/ df['Previous Close'] * 100.0 and my other one which is: df = df['PCT_change'] = (df['Previous Close'] - df['Nominal Price']) / df['Previous Close'] * 100.0

then I tried to enter them into my program by using this line of program: df= df[['HL_PCT','PCT_change','Share Volume (000)','Previous Close']]

Do you guys know what I am doing wrong,

thanks, Gops

2023-01-23 00:30:06
Please don't post images of code/data/errors. You can edit your question and replace the images with properly formatted text. See: How to ask a good question
Answers(0) :