More Operations with DataFrames
Get hands-on practice exploring various operations that can be performed on DataFrames.
We'll cover the following...
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.