Python Forum
How to use cse insensitive condition in lambda expresion
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use cse insensitive condition in lambda expresion
#2
You don't need to use .apply here, just select appropriate rows and set a new value, e.g.

df.loc[df['Status'].str.contains('pass', case=False), 'value'] = 0
Reply


Messages In This Thread
RE: How to use cse insensitive condition in lambda expresion - by scidam - Jul-13-2019, 10:31 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020