
Ultimate access to all questions.
Which of the following code blocks correctly returns a new DataFrame with a modified storeReview column where the suffix "End" has been removed from each string in the storeReview column of DataFrame storesDF?
A sample of DataFrame storesDF is shown below:
storeId storeReview
0 sem eleifend diam End
1 ...vitae odio egesta End
2 ...amet curabitur en End
3 ...tristique loborti End
4 ..condimentum facil End
storeId storeReview
0 sem eleifend diam End
1 ...vitae odio egesta End
2 ...amet curabitur en End
3 ...tristique loborti End
4 ..condimentum facil End
A
storesDF.withColumn("storeReview", col("storeReview").regexp_replace(" End$", ""))_
B
storesDF.withColumn("storeReview", regexp_replace(col("storeReview"), " End$", ""))_
C
storesDF.withColumn("storeReview”, regexp_replace(col("storeReview"), " End$"))_
D
storesDF.withColumn("storeReview", regexp_replace("storeReview", " End$", ""))_
E
storesDF.withColumn("storeReview", regexp_extract(col("storeReview"), " End$", ""))_