mercredi 3 février 2021

IF Else in Pandas DF [duplicate]

I want to replicate the below SQL query in Python on pandas dataframe

IF col1 IN (a,b,c) then 'Value1' else col1;

What is the best way to do this >

Aucun commentaire:

Enregistrer un commentaire