get unique values in column pyspark code example Example: unique values in pyspark column df.select("columnname").distinct().show()