I have a column in a data frame in pyspark like “Col1” below. I would like to create a new column “Col2” with the length of each string from “Col1”. I’m new to pyspark, I’ve been googling but haven’t seen any examples of how to do this. Any tips are very much appreciated.
example:
Col1 Col2
12 2
123 3