Instead of
data = data[val == attrval]
we should use
data = self._select(data, turns, turn)
that checks if data is not empty.
data