bforsyth744 / intro-data-capstone-biodiversity

0 stars 0 forks source link

Redundant comparison #4

Open sen1 opened 6 years ago

sen1 commented 6 years ago

https://github.com/bforsyth744/intro-data-capstone-biodiversity/blob/9fc2b0c2dd140344a070aec6905743b795d0e931/Capstone_Option_2/biodiversity.py.html#L345

Again, species.is_sheep is a boolean column with values either True/False. So comparing it with ==True does not make sense.

 sheep_species = species[species.is_sheep  & (species.category == 'Mammal')] 
bforsyth744 commented 6 years ago

I was having trouble with the logic on this line. I got confused and included the "== True" as part of my troubleshooting. I just forgot to take it out.