...

/

More Operations with DataFrames

More Operations with DataFrames

Get hands-on practice exploring various operations that can be performed on DataFrames.

We can also rename, drop or change the data type of DataFrame columns. Let’s see examples of these.

Changing column names

Our data has a rather awkward name for the column that represents movie rating: hitFlop. We can rename the column to the more appropriate name, “Rating,” using the withColumnRenamed method.

 ...