I have an array column in a pyspark df and would like to label the unique arrays that contains the same elements regardless of order, expected output:
| Array Column | Label |
| ------------ | ------ |
| [1,2,3] | Group1 |
| [3,2,1] | Group1 |
| [2,1,5] | Group2 |
| [1,2,5] | Group2 |
| [2,3,1] | Group1 |
Anyone has any ideas? array_except == empty would involve a row by row comparison and the data is pretty big. So wondering if there are any other solutions for pyspark.