Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL: ) q l d f = p d * r e a d s q l q uery ( q u e r y

SQL:
)ql
df=pd*readsqlquery(query, conn)
SELEC T: Where it comes from : What you need (comma between each)
AS:
FROM: Where the majority of SELECTS comes from
LEFT/INNER.JOIN: Where the additional SELECTS need retrieving
ON: Combine Where there is like attributes between columns
Ex: album.albumid = Track.albumid (this combines)
... Rest of Code
Lastly close the "then, Conn)
Example:
SELEC T: Specifies the columns you want in the result (AlbumID, Title, and Name).
FROM: Specifies the tables involved (Album and Artist).
INNER JOIN: Specifies that you want to combine rows from both tables where the
condition specified in the ON dause is met.
ON: Specifies the condifion for the join, in this case, matching ArtisuI from both tables.
Data Cleaning
Recall, there are several simple atrributes and methods we can use to
get a 'description' of our data. These include:
.shape: returns the number of rows and columns in the dataframe
.info(): lists information about columns including datatype and the number on non-null
values
.describe (): provides descriptive statis tics for numeric columns 1
We still can't see all the values but what we can do is use the sun() methed for a series which will add up all
We still can't see all the values but occurences of true in the series.
out [11]: astas
We have 45453 missing values which is the same amount of rows there are in the dataframe. So we can conclude
that the column is empty and thus can be removed from the dataframe. Lets quickly check the other unnamed columns. [NOTE]: just change the column name in the cell above. We can use the dropi) method to remove
columns. [NOTE]: just change the column name in the cell above. We can
We can use the value_counts() method to count up the frequency of each of the unique values in the
dataframe
Program should first read the initial balance and the annual prime rate.
Interest compounded monthly. To caculate monthly balance the program should first enter a number
of months to know the balance. The formula to calculate the balance after each month is: Current
Balance + Current Balance"(interest rate/12)
Prepare a function with the following header calculator and display the monthly balance
Function should also retum the total monthly interest that has been collected
Def get_value(balance, interest_rate, max_month)
Balance: the initial amount
Interest rate: the interest rate is the prime rate given plus 5.
Max month the number of months to know the balance.
Program must include main function 0
Show to two decimal places
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo

1st Edition

0763733148, 978-0763733148

More Books

Students also viewed these Databases questions