Php Array Merge Unique Values In Dataframe In Python