Question:

Given the following series ser1:

IndexValue
069
180
220
350
4100
570

State the output of the following command:

print(ser1 >= 70)

Show Hint

Remember: Relational operations on Pandas Series return Boolean Series. To filter values, use Boolean indexing like ser1[ser1 >= 70].

Updated On: Sep 18, 2025
  • IndexValue
    1 80
    4100
    570
  • IndexResult
    0F
    1T
    2F
    3F
    4T
    5T
  • IndexCondition
    1T
    4T
    5T
  • IndexValue
    1 80
    4100
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Step 1: Recall comparison operation on Pandas Series.
When a relational operator (like \texttt{>=}) is applied on a Series, the output is a Boolean Series of the same size, where each element is \texttt{True (T)} or \texttt{False (F)} depending on the condition.
Step 2: Apply condition \texttt{ser1 >= 70}
- Index 0 → 69 $\geq$ 70? → False (F)
- Index 1 → 80 $\geq$ 70? → True (T)
- Index 2 → 20 $\geq$ 70? → False (F)
- Index 3 → 50 $\geq$ 70? → False (F)
- Index 4 → 100 $\geq$ 70? → True (T)
- Index 5 → 70 $\geq$ 70? → True (T)

Step 3: Construct Boolean Series.
The result is: \[ \begin{tabular}{|c|c|} \hline 0 & F
1 & T
2 & F
3 & F
4 & T
5 & T
\hline \end{tabular} \]
Final Answer: \[ \boxed{\text{Option (2)}} \]
Was this answer helpful?
0
0

Questions Asked in CUET exam

View More Questions