Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can i fetch only this Symbol column from my Dataframe?

I have a Bhav Copy Dataframe which is I Downloaded from NSE website.
enter image description here

And In this Dataset I just wanna print Symbol Column.

print(bhav_copy['SYMBOL'])

but it is giving me this error,
enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Sorry, I don’t know what to say about this column name series in which only the Symbol column stored in a different format and other column stores in a different format in Bhav Copy Dataframe.

>Solution :

First key error exception happened when there is a mistake in column name

Check your SYMBOL index if it spelled correctly, you can check columns names in Dataframe by using:

bhav_copy.columns

It should formatted like that to print specific columns data from a Dataframe:

bhav_copy[["SYMBOL"]]

For more info on this topic check this reference.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading