100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

ML4T EXAM 1 QUESTIONS WITH COMPLETE SOLUTIONS!!

Rating
-
Sold
-
Pages
30
Grade
A+
Uploaded on
06-11-2024
Written in
2024/2025

ML4T EXAM 1 QUESTIONS WITH COMPLETE SOLUTIONS!!

Institution
ML4T
Course
ML4T










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
ML4T
Course
ML4T

Document information

Uploaded on
November 6, 2024
Number of pages
30
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

  • what librar

Content preview

ML4T EXAM 1 QUESTIONS WITH COMPLETE
SOLUTIONS!!


Header rows of a CSV should represent what type of data? Answer - Data that
changes over time.


What is PEAK data? Answer - Real stock data (formally known as HCP) from
Yahoo Finance.


Define "Close" for stock data. Answer - The actual price that was recorded at
the exchange for that day.


Define "Adjusted Close" for stock data. Answer - A number provided by the
data provider, adjusted for stock splits and dividend payments.


When will "Close" and "Adjusted Close" data be the same? Answer - For the
current day of data, we see these start to differ as we go back in time.


Who (and where) created the Pandas library? Answer - Wes McKinney at AQR
(hedge fund).


What is a key component of Pandas? Answer - The dataframe.


What function can be implemented from Pandas to read a CSV? Answer -
pd.read_csv("csv")

,How do you print the first five rows of a Pandas Dataframe? Answer - By using
the df.head() function.


How do you print the last five rows of a Pandas Dataframe? Answer - By using
the df.tail() function.


How would you get the rows between 10 and 20 for a Pandas Dataframe?
Answer - df[10:21]


What is the operation called for returning a subset of the rows from a Pandas
Dataframe? Answer - Slicing.


What function would you use to get the maximum value of a column in a
Pandas Dataframe? Answer - df['Column Name'].max()


What function would you use to get the mean value of a column in a Pandas
Dataframe? Answer - df['Column Name'].mean()


What library is used to plot data from a Pandas Dataframe? Answer -
matplotlib.pyplot


How would you use pyplot to plot data from a Pandas Dataframe? Answer -
Use .plot() on the columns you are interested in plotting (like df['Adj
Close'].plot()) and then calling plt.show()


What is one method you would use to plot two columns simultaneously from a
Pandas Dataframe? (Assume we're plotting 'Close' and 'Adj Close') Answer -
df[[['Close', 'Adj Close']]].plot(), plt.show()


How many days are typically traded at the NYSE? Answer - 252 days.

, What reference symbol is good to use to determine if there was trading on a
given day? Answer - SPY.


How would you create an empty dataframe indexed on a start and end date?
Answer - dates = pd.date_range(start_date, end_date), df =
pd.DataFrame(index=dates)


What type of join is performed by default when calling
df.join(some_dataframe)? Answer - A left join.


When using a join function between dataframe a and dataframe b in the
following format df_a.join(df_b), what happens to the rows not present in b
when joined with a? Answer - Pandas will fill these absent values with nan.


How do you join two DataFrames (df_1 and df_2)? Answer - df_1.join(df_2)


How would you drop the rows in a DataFrame that contain nan? Answer -
df.dropna()


How could you join two DataFrames and drop nan values in a single line?
Answer - df_1.join(df_2, how='inner')


How would you tell Pandas to index a DataFrame on dates when reading in a
CSV? Answer - pd.read_csv(csv, index_col='Date')


How would you rename a column in a DataFrame? Answer - df =
df.rename(columns={'old name' : 'new name'})

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
EvaTee Phoenix University
View profile
Follow You need to be logged in order to follow users or courses
Sold
4996
Member since
4 year
Number of followers
3555
Documents
51680
Last sold
3 days ago
TIGHT DEADLINE? I CAN HELP

Many students don\'t have the time to work on their academic papers due to balancing with other responsibilities, for example, part-time work. I can relate. kindly don\'t hesitate to contact me, my study guides, notes and exams or test banks, are 100% graded

3.9

909 reviews

5
435
4
160
3
165
2
45
1
104

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions