I get it (use Functions#lower , see Javadoc )
import org.apache.spark.sql.functions.lower
String columnName="Category name"; src=src.withColumn(columnName, lower(col(columnName))); src.show();
This replaced the old column with the new one, retaining the entire data set.
+------+--------------------+ |ItemID| Category name| +------+--------------------+ | ABC|brush & broom han...| | XYZ|wheel brush parts...| +------+--------------------+
source share