I have a pandas dataframe `tsp_data_unique` like this..

```
      order_id    quant_bought    Clusters
 0       537            2         Cluster 2
 1       540            1         Cluster 10
 2       541            1         Cluster 4
 3       542            2         Cluster 2
 4       543            2         Cluster 2
 5       545            3         Cluster 2
 6       546            2         Cluster 2
 7       548            3         Cluster 1
 8       549            3         Cluster 6
 9       550            4         Cluster 2
 10      553            1         Cluster 11
 11      555            1         Cluster 1
 12      556            1         Cluster 1
 13      557            1         Cluster 3
 14      584            3         Cluster 2
 15      586            3         Cluster 2
 16      587            3         Cluster 5
 17      588            1         Cluster 7
 18      589            1         Cluster 10
 19      590            1         Cluster 9
 20      591            2         Cluster 2
 21      592            3         Cluster 2
 22      593            1         Cluster 2
 23      594            7         Cluster 8
 24      595            3         Cluster 2
 25      596            1         Cluster 1
 26      608            2         Cluster 2
 27      609            4         Cluster 2

```

And the second dataframe as `df`

```
      Clusters                                           order_id
0    Cluster 1                               [548, 555, 556, 596]
1   Cluster 10                                         [540, 589]
2   Cluster 11                                              [553]
3    Cluster 2  [537, 542, 543, 545, 546, 550, 584, 586, 591, ...
4    Cluster 3                                              [557]
5    Cluster 4                                              [541]
6    Cluster 5                                              [587]
7    Cluster 6                                              [549]
8    Cluster 7                                              [588]
9    Cluster 8                                              [594]
10   Cluster 9                                              [590] 

```

Now I want to arrange the `order_id's` of `Cluster 2` of `df` dataframe `Clusters` column in descending order by `quant_bought` column in 1st dataframe.

I am doing following in python.

```
 p  =  df.order_id[df['Clusters'] == 'Cluster 2']
 a = tsp_data_unique['order_id'].isin(p.values[0])
 b = tsp_data_unique['quant_bought'][a]   
 b.sort() 
 b = b[::-1]
 p = tsp_data_unique['order_id'][b.index]
 list_p = p.values.tolist()
 df.order_id[df['Clusters'] == 'Cluster 2'] = list_p

```

When I assign the descending ordered list to `Cluster 2` in `df` it gives me an error

`ValueError: Length of replacements must equal series length`

Please help..