QuestionQ75

Prepare data

HOTSPOT -

You have a Fabric tenant that contains a lakehouse named Lakehouse1. Lakehouse1 contains a table named Nyctaxi_raw. Nyctaxi_row contains the following table:

Question Image

You create a Fabric notebook and attach it to Lakehouse1.

You need to use PySpark code to transform the data. The solution must meet the following requirements:

  • Add a column named pickupDate that contains only the date portion of pickupDateTime.
  • Filter the DataFrame to include only rows where fareAmount is positive and less than 100.

How should you complete the code?

Community Discussion

No comments yet. Be the first to start the discussion!