# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: 'Python 3.8.3 64-bit (''ironhack'': conda)'
#     language: python
#     name: python38364bitironhackcondae22397c42f6b4fd29a9381c81ac70f68
# ---

# +
import pandas as pd

import pymysql as sql
import settings as env

# +
connection = sql.connect(
    host=env.HOST,
    user=env.USERNAME,
    password=<PASSWORD>,
    db=env.DB,
    cursorclass=sql.cursors.DictCursor
)

cursor = connection.cursor()
# -

query = """
SELECT * FROM player_combat_stats
LEFT JOIN player_flair_stats
USING (account_id, champion, lane, won)
LEFT JOIN player_laning_stats
USING (account_id, champion, lane, won)
LEFT JOIN player_objective_stats
USING (account_id, champion, lane, won)
WHERE lane = 'TOP';
"""
cursor.execute(query)
data = cursor.fetchall()

pd.DataFrame(data)

StarcoderdataJupyterScriptsDedupFiltered