<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def sub(self, inplace=False, **kwargs):
 """Return a entity where the conditions are met"""

        filter_ = self.where(**kwargs)
        return self.subindex(filter_, inplace)