A data scientist wants to remove the star_rating column from the Delta table at the location path. To do this, they need to load in data and drop the star_rating column.
Which option best code blocks accomplishes this task?
I think we practiced a similar question where we had to manipulate a DataFrame. It involved using `withColumn` and `drop`, but I can't recall the exact syntax.
Easy peasy! I'll just read in the data, confirm the column names, and then use that drop() method to get rid of the star_rating column. Shouldn't take more than a few lines of code.
Ugh, I'm a little unsure about the location path part. I'll need to double-check how to properly load the data from that specified location. But once I have the DataFrame, dropping the column should be easy.
No problem, I've done something like this before. I'll load the data, check the column names, and then use DataFrame.drop() to remove the star_rating column.
Okay, let's see. I'll need to figure out how to load the data from the specified location path first. Then I can drop the column using DataFrame.drop().
Serina
5 days agoYong
10 days agoChaya
15 days agoCurt
20 days agoSusy
25 days agoLasandra
1 month agoJani
1 month ago