Let us filter the data related to YAHOO stocks and majorly work on how to predict the closing prices of YAHOO.
Note:
head()
displays the top 5 rows of the data frame, whereas head(n)
displays the top n rows of the data frame.
shape
of a data frame returns a tuple with the number of rows and columns of the data frame.
Filter the YHOO
data from the data frame df
, and store the thus obtained YAHOO data in df_yahoo
data frame.
df_yahoo = df[df['symbol']=='YHOO']
View the top 10 rows from the df_yahoo
data frame using head()
.
<< your code comes here >>.head()
View the shape of the YAHOO data stored in df_yahoo
data frame.
df_yahoo.<< your code comes here >>
We observe there are 1762 rows and 7 columns in this data frame.
Taking you to the next exercise in seconds...
Want to create exercises like this yourself? Click here.
Note - Having trouble with the assessment engine? Follow the steps listed here
Please login to comment
0 Comments
There are 3 new comments.