Open sen1 opened 6 years ago
https://github.com/bforsyth744/intro-data-capstone-biodiversity/blob/9fc2b0c2dd140344a070aec6905743b795d0e931/Capstone_Option_2/biodiversity.py.html#L329
'Sheep' in x returns a boolean. So adding an extra if does not really gain you anything. You code works but inefficient.
'Sheep' in x
if
species['is_sheep'] = species.common_names.apply(lambda x: Sheep' in x)
That's cool. Makes sense. Thanks. I'll remember that.
https://github.com/bforsyth744/intro-data-capstone-biodiversity/blob/9fc2b0c2dd140344a070aec6905743b795d0e931/Capstone_Option_2/biodiversity.py.html#L329
'Sheep' in x
returns a boolean. So adding an extraif
does not really gain you anything. You code works but inefficient.