filter elements in series pandas code example Example: how to filter a series in pandas s = pd.Series(test) s = s[s != 1]