Question: I'm having some texts and for each text I'm having some tokens attached to it in a single column. The data looks like

```
Text_ID, Token
1, energy
1, debit
1, flat
2, energy
2, house
3, energy
3, debit

```

I created a metric according to `countd(Text_ID)` to count the numbers of distinct texts/text\_ids. Now putting everything in the obvious way on a worksheet and selecting/filtering some tokens gives me essentially a union.

I'd like to select energy and debit and get the proper count 2 instead of 3 here. Of course I'm having a lot of tokens, hence the approach described [here](https://stackoverflow.com/questions/25929313/how-to-create-intersection-data-in-tableau) is not scalable.

Any suggestions on how to proceed here?
I'd assume that I need to create two parameters here, but I don't know how to use them to filter properly.

Answer: 
Select everything **EXCEPT the last 3 columns**, do this using `iloc`: 

```
In [1639]: df
Out[1639]: 
   a  b  c  d  e
0  1  3  2  2  2
1  2  4  1  1  1

In [1640]: df.iloc[:,:-3]
Out[1640]: 
   a  b
0  1  3
1  2  4

```
Use this `df.columns` being sliced, and putted into a `df[...]` bracket:

```
print(df[df.columns[:-3]])

```