Find the output of the following Python code: import pandas as pd…
2023
Find the output of the following Python code: import pandas as pd M=pd.Series({'P':10, 'Q':90}) print(M)
- A.
P Q
10 90
- B.
P 10
Q 90
- C.
0 P 10
1 Q 90
- D.
10 P
90 Q
Attempted by 135 students.
Show answer & explanation
Correct answer: B
Creating a Series from a dictionary makes the keys the index and the values the data. So the output is: P 10 Q 90 This matches option (2).