Filter rows in a table

Hi everyone,

I want to filter rows in a column of a table that is in a tag, the value of the filter is in another tag. I´ve tried with this code but it's not working

valor_filtro = system.tag.read("[default]Mecanizado/InputPallet").value
tagtabla = "[default]Mecanizado/Blocks-Pallets"
datatabla = system.dataset.toPyDataSet(system.tag.read(tagtabla).value) 

tabla_filtrada = datatabla[datatabla['Pallet'] == valor_filtro]

system.tag.write("[default]Mecanizado/tablaimpresion",tabla_filtrada.value)

I would appreciate any help or information you could give me. Thank you!

That's not valid python.

sorry i don't understand :frowning:

Tell me what you don't understand and I'll try to explain.

What do you want this line to do?

Some possible solutions in this other thread: