English

Which of the following Python statements creates an empty Pandas DataFrame (Note: pd is an alias for pandas)? - Informatics Practices

Advertisements
Advertisements

Question

Which of the following Python statements creates an empty Pandas DataFrame (Note: pd is an alias for pandas)?

Options

  • pd.DataFrame(None)
  • pd.DataFrame()
  • pd.DataFrame([])
  • pd.DataFrame.empty()
MCQ
Advertisements

Solution

pd.DataFrame()

Explanation:

In pandas, calling pd.DataFrame() without any arguments creates an empty DataFrame, one with no rows and no columns.

shaalaa.com
  Is there an error in this question or solution?
2025-2026 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×