मराठी

Assertion (A): The drop() method in Pandas can be used to delete rows and columns from a DataFrame. Reason (R): The axis parameter in the drop() method specifies whether to delete rows (axis=0) - Informatics Practices

Advertisements
Advertisements

प्रश्न

Assertion (A): The drop() method in Pandas can be used to delete rows and columns from a DataFrame.

Reason (R): The axis parameter in the drop() method specifies whether to delete rows (axis=0) or columns (axis=1).

पर्याय

  • Both Assertion (A) and Reason (R) are True and Reason (R) is the correct explanation for Assertion (A).

  • Both Assertion (A) and Reason (R) are True and Reason (R) is not the correct explanation for Assertion (A).

  • Assertion (A) is True and Reason (R) is False.

  • Assertion (A) is False, but Reason (R) is True.

MCQ
विधान आणि तर्क
Advertisements

उत्तर

Both Assertion (A) and Reason (R) are True and Reason (R) is the correct explanation for Assertion (A).

Explanation:

In Pandas, the drop() method is used to remove rows or columns from a DataFrame. The axis parameter specifies what is deleted:

  • axis=0 removes rows
  • axis=1 removes columns

Therefore, both the assertion and the reason are true, and the reason correctly explains the assertion.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Set 4
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×