how to rename column name in dataframe spark code example Example: how to rename a column in pyspark dataframe df.withColumnRenamed("dob","DateOfBirth")