Python Forum
finding dupes (with a twist) - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: finding dupes (with a twist) (/thread-26340.html)

Pages: 1 2 3


RE: finding dupes (with a twist) - buran - May-28-2020

In this particular case I would say there is no difference
I guess what bothers you is the use of lambda. Basically that is anonymous function

it's the same to have separate function
def lowercase_email(email):
    return email.lower()

...
df['Email'] = df['Email'].apply(lowercase_email)
look at pandas.Series.apply