Created
April 5, 2021 04:23
-
-
Save isaacarroyov/c5ed45ba65a14e4d86c6257f97b2b6f0 to your computer and use it in GitHub Desktop.
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
#assign colours to duration days | |
def colour_duration(string): | |
if string == '1 Día': | |
return '#003049' | |
elif string == '2 a 3 Días': | |
return '#FCBF49' | |
elif string == '4 a 7 Días': | |
return '#F77F00' | |
else: | |
return '#D62828' | |
# translate from spanish to english | |
def translate_days(string): | |
if string == '1 Día': | |
return '1 day' | |
elif string == '2 a 3 Días': | |
return '2 to 3 days' | |
elif string == '4 a 7 Días': | |
return '4 to 7 days' | |
else: | |
return 'More than 7 days' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment