- This guide provides instructions on how to run the
data.ipynb
Jupyter Notebook, which contains code for initializing a MySQL database, creating tables, and inserting data for healthcare data analysis.
Before running the notebook, make sure you have the following installed:
Make sure to have the following locally,
Installed python3
- Python (3.x recommended)
- Jupyter Notebook
- MySQL (Make sure the MySQL server is running)
You can also upload the notebook into colab
or Anaconda
pip install pandas mysql-connector-python
jupyter notebook data.ipynb
-
Open the data.ipynb notebook in the Jupyter Notebook interface.
-
Execute each cell in the notebook sequentially by clicking the "Run" button.
-
Update Database Connection Details (if needed):
-
If you encounter any connection issues, update the database connection details (host, user, password, database) in the code cells where the MySQL connection is established. Review Results:
-
After running all cells, review the results to ensure that tables are created, data is inserted, and queries execute successfully.
-
If you encounter any errors during the setup, refer to the error messages for guidance. Common issues may include MySQL server not running, incorrect connection details, or missing dependencies.
-
Ensure that the data.xlsx file containing healthcare data is present in the same directory as the notebook.
-
If you have not set a password for your MySQL root user, leave the password field empty in the code where the MySQL connection is established.