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 do I put all the rows that don't have a certain value into a dataframe?(jupyter notebook/google colab)

under ileads_address I’m trying to create a DF that only prints out all the rows that don’t have 0.0. Is there anyway to code that?

I tried doing this

df5 = df4[~df4['ileads_address'] == 0]

Sample CSV File

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

>Solution :

Try this

df4[df4['ileads_address'] != 0]
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