Fill in the blanks with an appropriate command from the given options to…

PYQ KVS TGT/PGT 2023

Fill in the blanks with an appropriate command from the given options to produce the output shown on the right side of the following code: import pandas as pd D=[[1,2],[3,4]] A=["A1", "A2"] B=["B1", "B2"] Print(D)

image.png
  1. A.

    D=pd.DataFrame(D, columns=A, index=B)

  2. B.

    D=pd.DataFrame(D,rows=B,columns=A)

  3. C.

    D=pd.DataFrame(D, B, i=A)

  4. D.

    D=pd.DataFrame(A,B,D)

Attempted by 1055 students.

Sign up free to check your answer

Sign up free

Explore the full course: Kvs Nvs Tier 2 Computer Science

Loading lesson…