I have a problem. I want to investigate whether my assumption is correct that it can be said that `receiver X` frequently receives a delivery from `consignor Y`.
I have grouped `receiver`  and `consignor`  for this purpose.

However, what I would like to do now, I would like to output to myself all `receivers`  where the most frequent `consignor` contains more than 80% of all `consignors` in `receiver` .

For example we have `receiver c` this has received from `consignor 2, 3` what. From `consignor 2` only 1 packet and from `consignor 3` 4 packets. Thus he has received a total of 5 packets. Thus `consignor 3` accepts 80% of all `consignor` within `receiver c`.
Thus `receiver c` should be represented in a table. This should be done below for all others.

In simple terms, I want all `receivers` that have more than 80% of a given `consignor`.

How can I do this?

What I want

```py
receiver  consignor  count_with_most_consignor  count_all
       c          3                          4          5
       d          2                          4          5       

```

Dataframe

```py
    consignor receiver
0           1        a
1           2        a
2           1        a
3           2        c
4           3        c
5           1        b
6           3        c
7           3        c
8           3        c
9           2        d
10          2        d
11          2        d
12          1        d
13          2        d

```

Code

```py
import pandas as pd
d = {'consignor': [1, 2, 1, 2, 3, 1, 3, 3, 3, 2, 2, 2, 1, 2],  
     'receiver': ['a', 'a', 'a', 'c', 'c', 'b', 'c', 'c', 'c', 'd', 'd', 'd', 'd', 'd']}
df = pd.DataFrame(data=d)
print(df)
df_  = df.groupby(['receiver','consignor']).size().reset_index(name='counts').sort_values(by=['counts'], ascending=False)
print(df_)

X = 'c'
print(df_[df_['receiver'] == X].shape[1])
print(df_[df_['receiver'] == X])

```

Out

```py
[OUT]
3
  receiver  consignor  counts
4        c          3       4
3        c          2       1

```