Skip to main contentSkip to solution

The mandatory libraries for facilitating import and export of data between Pandas and MySQL are:

(A) pymysql

(B) CSV

(C) DataFrame

(D) sqlalchemy

Solution

✅ Correct Option: 4

pymysql is the driver that lets Python talk to a MySQL database, and sqlalchemy creates the engine/connection that Pandas uses in to_sql() and read_sql(). Together they enable import and export of data between Pandas and MySQL.


(B) CSV: a file format, not needed for a direct Pandas-MySQL transfer.

(C) DataFrame: a Pandas data structure, not a separate library to install.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question