CBSE Class 12 Informatics Practices
Question 5 of 70
Importing/Exporting Data between CSV Files/MySQL and Pandas — Question 5
Back to all questions 5
Question Assertion. A DataFrame's data can be exported as a table of a mysql database.
Reason. Over an established connection to a mysql database, <DF>.to_sql() would write the data of the DataFrame <DF> as a table in the mysql database.
- Both A and R are true and R is the correct explanation of A.
- Both A and R are true but R is not the correct explanation of A.
- A is true but R is false.
- A is false but R is true.
Both A and R are true and R is the correct explanation of A.
Explanation
In Pandas, a DataFrame's data can be exported as a table of a mysql database. Over an established connection to a mysql database, the DF.to_sql() method is used to write the data of the DataFrame DF as a table in the mysql database.