def copy_if(story_data):
    """
    Copies values from the source to the "named_as" if the condition is True,
    otherwise inserts NA

    usage:

        Apply(source_fields=["some_source_field", "some_condition_field"],
              named_as="some_result_field",
              f=copy_if)
    """

    condition_field, source_field = story_data.columns
    copied = story_data.where(story_data[condition_field])[[source_field]]
    return copied.rename(columns={source_field: "result"})