|
| 1 | +{ |
| 2 | + "cells": [ |
| 3 | + { |
| 4 | + "cell_type": "markdown", |
| 5 | + "metadata": {}, |
| 6 | + "source": [ |
| 7 | + "# Explore here\n", |
| 8 | + "\n", |
| 9 | + "It's recommended to use this notebook for exploration purposes.\n", |
| 10 | + "\n", |
| 11 | + "For example: \n", |
| 12 | + "\n", |
| 13 | + "1. You could import the CSV generated by python into your notebook and explore it.\n", |
| 14 | + "2. You could connect to your database using `pandas.read_sql` from this notebook and explore it." |
| 15 | + ] |
| 16 | + }, |
| 17 | + { |
| 18 | + "cell_type": "code", |
| 19 | + "execution_count": null, |
| 20 | + "metadata": {}, |
| 21 | + "outputs": [], |
| 22 | + "source": [ |
| 23 | + "# Example reading the SQL database from here\n", |
| 24 | + "\n", |
| 25 | + "# from dotenv import load_dotenv\n", |
| 26 | + "# from sqlalchemy import create_engine\n", |
| 27 | + "# import pandas as pd\n", |
| 28 | + "\n", |
| 29 | + "# # load the .env file variables\n", |
| 30 | + "# load_dotenv()\n", |
| 31 | + "\n", |
| 32 | + "# connection_string = f\"mysql+pymysql://{os.getenv('DB_USER')}:{os.getenv('DB_PASSWORD')}@{os.getenv('DB_HOST')}/{os.getenv('DB_NAME')}?autocommit=true\"\n", |
| 33 | + "# engine = create_engine(connection_string)\n", |
| 34 | + "# engine.connect()\n", |
| 35 | + "\n", |
| 36 | + "# dataframe = pd.read_sql(\"Select * from books;\", engine)\n", |
| 37 | + "# print(dataframe.describe())" |
| 38 | + ] |
| 39 | + }, |
| 40 | + { |
| 41 | + "cell_type": "code", |
| 42 | + "execution_count": null, |
| 43 | + "metadata": {}, |
| 44 | + "outputs": [], |
| 45 | + "source": [ |
| 46 | + "# Example importing the CSV here\n", |
| 47 | + "\n", |
| 48 | + "# dataframe = pd.read_csv('../path/to/file.csv')\n", |
| 49 | + "# dataframe.describe()" |
| 50 | + ] |
| 51 | + } |
| 52 | + ], |
| 53 | + "metadata": { |
| 54 | + "kernelspec": { |
| 55 | + "display_name": "Python 3.8.13 64-bit ('3.8.13')", |
| 56 | + "language": "python", |
| 57 | + "name": "python3" |
| 58 | + }, |
| 59 | + "language_info": { |
| 60 | + "codemirror_mode": { |
| 61 | + "name": "ipython", |
| 62 | + "version": 3 |
| 63 | + }, |
| 64 | + "file_extension": ".py", |
| 65 | + "mimetype": "text/x-python", |
| 66 | + "name": "python", |
| 67 | + "nbconvert_exporter": "python", |
| 68 | + "pygments_lexer": "ipython3", |
| 69 | + "version": "3.8.13" |
| 70 | + }, |
| 71 | + "orig_nbformat": 4, |
| 72 | + "vscode": { |
| 73 | + "interpreter": { |
| 74 | + "hash": "110cc1dee26208153f2972f08a2ad52b6a56238dc66d48e87fb757ef2996db56" |
| 75 | + } |
| 76 | + } |
| 77 | + }, |
| 78 | + "nbformat": 4, |
| 79 | + "nbformat_minor": 2 |
| 80 | +} |
0 commit comments