Skip to content
Discussion options

You must be logged in to vote

@ozgurkalan How about this version with the across selector?

REPLACEMENTS = {"iso2c": "KN", "country": "St. Kitts and Nevis", "cluster": "NAM"}
t.mutate(
    s.across(
        REPLACEMENTS,
        lambda c: ibis.where(
            t.country_name_given == "St.Kitts&Nevis", REPLACEMENTS[c.get_name()], c
        ),
    )
)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@ozgurkalan
Comment options

Comment options

You must be logged in to vote
1 reply
@ozgurkalan
Comment options

Answer selected by cpcloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants