हिंदी

Which of the following Python statements is used to import data from a CSV file into a Pandas DataFrame (Note: pd is an alias for pandas)? - Informatics Practices

Advertisements
Advertisements

प्रश्न

Which of the following Python statements is used to import data from a CSV file into a Pandas DataFrame (Note: pd is an alias for pandas)? 

विकल्प

  • pd.open_csv('filename.csv') 

  • pd.read_csv('filename.csv')

  • pd.load_csv('filename.csv')

  • pd.import_csv('filename.csv') 

MCQ

उत्तर

pd.read_csv('filename.csv')

Explanation:

To import data from a CSV file into a DataFrame, use Pandas' pd.read_csv() function. read_csv() converts the contents of a CSV file to a tabular format, making it simple to analyze and manipulate the data with Pandas. 

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
2024-2025 (March) Board Sample Paper
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×