Created
April 29, 2020 11:59
-
-
Save cereniyim/38cb1aa2973c17928e17e372065aeab0 to your computer and use it in GitHub Desktop.
extract blend from variety function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def extract_blend_from_variety(variety): | |
# function to find if a variety is a blend | |
# ASSUMPTION: There is no NA values | |
# in the variety feature | |
if (variety.find("-") != -1) | (variety.find("Blend") != -1): | |
if variety == "Xarel-lo": | |
return 0 | |
else: | |
return 1 | |
else: | |
return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment