Suppose I have a dataframe A.

```
ID   action
1      A
2      B
3      C
4      D
5      E
6      A
7      B
8      C
...

```

And I would like to find the follwing pattern from dataframe A:

```
[A,B,C]

```

I would like to count the frequency of the sublist and find the ID of each element:

output, this is just a idea of output, the output can be dict or list, I am not sure which type is better.

```
the frequency is 2:
[A:1,B:2,C:3]
[A:6, B:7,C:8]

```