This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Load the dataset | |
| df = pd.read_csv('EPL_20_21.csv') | |
| df.head() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import seaborn as sns | |
| import plotly.graph_objects as go | |
| from plotly.subplots import make_subplots | |
| %matplotlib inline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # typical subquery syntax | |
| SELECT column_name | |
| FROM table_name # the main query | |
| WHERE column_name expression operator | |
| ( SELECT COLUMN_NAME from TABLE_NAME WHERE ... ); # subquery |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name(s) | |
| FROM table1 T1, table1 T2 | |
| WHERE condition; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name(s) | |
| FROM table1 | |
| FULL OUTER JOIN table2 | |
| ON table1.column_name = table2.column_name | |
| WHERE condition; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name(s) | |
| FROM table1 | |
| RIGHT JOIN table2 | |
| ON table1.column_name = table2.column_name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name(s) | |
| FROM table1 | |
| LEFT JOIN table2 | |
| ON table1.column_name = table2.column_name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name(s) | |
| FROM table1 | |
| INNER JOIN table2 | |
| ON table1.column_name = table2.column_name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT column_name(s) | |
| FROM table_name | |
| WHERE condition | |
| GROUP BY column_name(s) | |
| ORDER BY column_name(s); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Display what the computer chose: | |
| randomNumber = random.randint(1, 3) | |
| if randomNumber == 1: | |
| computerMove = 'r' | |
| print('ROCK') | |
| elif randomNumber == 2: | |
| computerMove = 'p' | |
| print('PAPER') | |
| elif randomNumber == 3: | |
| computerMove = 's' |