Answers for "apply multiple condtions for row in pandas"

1

python multiple conditions in dataframe column values

df.loc[(df['Salary_in_1000']>=100) & (df['Age']< 60) & (df['FT_Team'].str.startswith('S')),['Name','FT_Team']]
Posted by: Guest on August-25-2021
0

update multiple rows dataframe

df.loc[df.strings.isin(["C", "D", "E"]), df.columns.difference(["strings"])] = 0
df
Out[82]: 
  price strings value
0     1       A     a
1     2       B     b
2     0       C     0
3     0       D     0
4     0       E     0
Posted by: Guest on June-19-2021

Code answers related to "apply multiple condtions for row in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language