See here for how to format code: How to ask a good question (But, to be clear, I don’t understand why you decided to copy my code into your post.)
You don’t need to be an Anvil subscriber to test any of the code we’ve been talking about. And that’s probably what you should do next. I don’t feel like we’re making progress trying to help you here but rather going around in circles. My guess is that you either need to learn more basic Python or else spend some more time with the Anvil docs on Data Tables, trying out for yourself the examples provided there and gaining understanding that way.
Here’s a relevant tutorial: Searching and Filtering