79626402

Date: 2025-05-17 10:07:36
Score: 2
Natty:
Report link

Currently (Pandas 2.2.3), this can be done using the map method (https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.map.html). For example:

def yes_or_no(value):
    return not value or "N/A" in value or "-" in value

df.map(yes_or_no)
Reasons:
  • Probably link only (1):
  • Low length (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: anapaulagomes