Section 8 Unit 14 error message Python for Trading

Hello all

namaste

With some difficulty I saved a screenshot of the error message and have added the link herein. The code I wrote as well as the code that appeared in the solution code are identical which can be seen from the error message herein. 

I do not know if I am making some basic errors here. Hope everyone is able to see the word document. 

I have learnt to attach files to Google docs and create a link for sharing them. If this link does not work please inform me. 

Help from the community is requested. 

Thanks in advance to all 

Hello Ramamurthy,



For now, the process to upload the screenshots in the community forum is the same as done by you. 



Coming to your query, I noticed that the error message said "close". In Python, the column names are case-sensitive.

You can try the code like this, my_mean = infy["Close Price"].mean()





Here, the column name is written as "Close Price".

I think this should solve your issue, but if it doesn't please reply and we can work together to resolve it. 



Hope this helps.

 

Hello Mr Pachanekar

Thanks for responding. 

If you see line 9 the column name is showing as 'Close Price' and I followed the same in line 15 which could be seen in my message. 

However, when I rerun the program again after some time and all the labour, it worked fine with the same syntax. 

I agree with your point that the column and field names have to be exactly same in all positions. 

regards 

Hi Ramamurthy,



The screenshot was taken for the solution code. I guess that you first typed 'close_price' in the write your code part, then you checked the solution code.



Hope this helps with the confusion.