Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
1.5.0
-
None
Description
The withColumnRenamed method does not raise an exception when the existing column does not exist in the dataframe.
Example:
In [4]: df.show() +---+-----+ |age| name| +---+-----+ | 1|Alice| +---+-----+ In [5]: df = df.withColumnRenamed('dob', 'date_of_birth') In [6]: df.show() +---+-----+ |age| name| +---+-----+ | 1|Alice| +---+-----+