The code block shown below should return a new DataFrame from DataFrame storesDF where column modality is the constant s

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899559
Joined: Mon Aug 02, 2021 8:13 am

The code block shown below should return a new DataFrame from DataFrame storesDF where column modality is the constant s

Post by answerhappygod »

The code block shown below should return a new DataFrame from DataFrame storesDF where column modality is the constant string "PHYSICAL", Assume DataFrame storesDF is the only defined language variable. Choose the response that correctly fills in the numbered blanks within the code block to complete this task.
Code block:
storesDF. _1_(_2_,_3_(_4_))

A. 1. withColumn
2. "modality"
3. col
4. "PHYSICAL"
B. 1. withColumn
2. "modality"
3. lit
4. PHYSICAL
C. 1. withColumn
2. "modality"
3. lit
4. "PHYSICAL"
D. 1. withColumn
2. "modality"
3. SrtringType
4. "PHYSICAL"
E. 1. newColumn
2. modality
3. SrtringType
4. PHYSICAL
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This question has been solved and has 1 reply.

You must be registered to view answers and replies in this topic. Registration is free.


Register Login
 
Post Reply