Is the \ character in the following HINT correct? What does it mean since this is not a division condition? I am unable to find any reference in the lessons for “”… is it an error meant to be a pipe (|)?
QUESTION:
2. Many of our customers want to buy vegan shoes (shoes made from materials that do not come from animals). Add a new column called shoe_source
, which is vegan
if the materials is not leather
and animal
otherwise.
HINT: The following lambda function might be helpful:
mylambda = lambda x: 'animal' \ `
if x == 'leather' else 'vegan'