Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiple conditions
#7
Are you using Pandas?
Then that info should be provided in you first post,as the answer may be quite different.
Example how a check look in Pandas,eg using name and salary.
import pandas as pd

df = pd.read_clipboard()
status_check = df[df['name'].str.contains('spiderman|antman') & (df['salary'].between(1000, 2000))]
print(status_check)
Output:
name age salary city 10 spiderman 30 1000 auckland 11 spiderman 31 1800 beijing 15 antman 34 1200 dubai 16 antman 35 1800 malaysia
Reply


Messages In This Thread
multiple conditions - by Chandan - Jan-30-2020, 12:55 AM
RE: multiple conditions - by metulburr - Jan-30-2020, 03:42 AM
RE: multiple conditions - by Chandan - Jan-30-2020, 10:31 AM
RE: multiple conditions - by metulburr - Jan-30-2020, 12:14 PM
RE: multiple conditions - by Chandan - Jan-30-2020, 12:48 PM
RE: multiple conditions - by metulburr - Jan-30-2020, 01:07 PM
RE: multiple conditions - by snippsat - Jan-30-2020, 01:32 PM
RE: multiple conditions - by Chandan - Jan-31-2020, 12:53 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How do you format Update statement with multiple conditions hammer 4 2,159 Dec-16-2021, 10:49 PM
Last Post: hammer
  Multiple conditions when indexing an array with or without np.where noob2305 1 2,704 Oct-25-2020, 02:06 PM
Last Post: jefsummers
  Multiple conditions, one is null moralear27 1 2,225 Sep-13-2020, 06:11 AM
Last Post: scidam
  Help with multiple conditions on ATM program jakegold98 6 9,254 Dec-06-2017, 05:18 PM
Last Post: jakegold98
  Simplifying multiple "or" conditions in if statement. rhubarbpieguy 8 102,287 Jul-22-2017, 12:19 PM
Last Post: rhubarbpieguy

Forum Jump:

User Panel Messages

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