Basically instead of writing
data[data[\'pos\'] == \"QB\" | data[\'pos\'] == \"DST\" | ...]
where there are many cases I want to check
What you are looking for is Series.isin . Example -
data[data['pos'].isin(("QB", "DST", ...))]
This would check if each value from pos is in the list of values - ("QB", "DST", ...) . Similar to what your multiple | would do.
pos
("QB", "DST", ...)
|