How to update Row/column value in a Apache Spark DataFrame?
Try This:
final DataFrame withoutCurrency = sqlContext.createDataFrame(somedf.javaRDD().map(row -> {
return RowFactory.create(row.get(0), row.get(1), someMethod(row.get(2)));
}), somedf.schema());