Buat kolom baru dengan karakter pertama string pyspark

df = df.withColumn("first_n_char", df.colname.substr(1))
Sooi Versavel