How to convert a column value in Spark dataframe to lowercase/uppercase in Java?
For example, below is the input dataframe:
name | country | src | city | debit
---------------------------------------------
"foo"| "NZ" | salary | "Auckland" | 15.0
"bar"| "Aus" | investment | "Melbourne"| 12.5
I need convert the 'city' column to lower case
name | country | src | city | debit
------------------------------------------------
"foo"| "NZ" | salary | "auckland" | 15.0
"bar"| "Aus" | investment | "melbourne"| 12.5
I have found solutions in Scala and Python, but not in Java as below
How to change case of whole column to lowercase?
In java there is a solution to convert column names, but not its data.
How to lower the case of column names of a data frame but not its values?
How can I convert column values to lowercase?