Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Please answer the questions with codes and comments. Please complete the problems on jupyter notebook

1 answer below »
Please answer the questions with codes and comments. Please complete the problems on jupyter notebook
Answered Same Day Mar 17, 2023

Solution

Baljit answered on Mar 18 2023
25 Votes
3/18/23, 11:49 AM Untitled - Jupyter Notebook
localhost:8888/notebooks/Untitled Folde
Untitled.ipynb 1/6
Li
ary imports
In [1]:
Import database into a variable data
In [2]:
import sqlite3
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
data = sqlite3.connect('lahmansbaseballdb.sqlite')
3/18/23, 11:49 AM Untitled - Jupyter Notebook
localhost:8888/notebooks/Untitled Folde
Untitled.ipynb 2/6
Selection of data between year 2006 and 2016
Exercise 1
In [3]: df = pd.read_sql_query("SELECT *,sum(salary) FROM Salaries WHERE yearID BETWEE
display(df)
3/18/23, 11:49 AM Untitled - Jupyter Notebook
localhost:8888/notebooks/Untitled Folde
Untitled.ipynb 3/6
ID yearID teamID team_ID lgID playerID salary sum(salary)
0 17756 2006 NYA 2523 AL cairomi01 1000000.0 2.263671e+09
1 17378 2006 BOS 2509 AL bardjo01 353400.0 1.675458e+09
2 17676 2006 LAN 2520 NL alomasa02 650000.0 1.598053e+09
3 17544 2006 DET 2515 AL bondeje01 2300000.0 1.457055e+09
4 17836 2006 PHI 2526 NL a
eubo01 13600000.0 1.399510e+09
5 17651 2006 LAA 2519 AL alfoned01 8000000.0 1.347061e+09
6 17946 2006 SFN 2530 NL accarje01 330000.0 1.315003e+09
7 17431 2006 CHN 2511 NL ba
emi01 4333333.0 1.243140e+09
8 17784 2006 NYN 2524 NL banni
01 327000.0 1.215769e+09
9 17405 2006 CHA 2510 AL ande
03 330000.0 1.186187e+09
10 17972...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here