Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Open the Datasets Task.ipynb file and complete the following tasks in the notebook. Save your notebook to your task folder for submission. 1 . Write

Open the Datasets Task.ipynb file and complete the following tasks in the
notebook. Save your notebook to your task folder for submission.
1. Write the code that performs the action described in the following
statements.
a. Select the 'Limit' and 'Rating' columns of the first five observations
b. Select the first five observations with 4 cards
c. Sort the observations by 'Education'. Show users with a high
education value first.
2. Write a short explanation in the form of a comment for the following lines of
code.
a. df.iloc[:,:]
b. df.iloc[5:,5:]
c. df.iloc[:,0]
d. df.iloc[9,:]Compulsory Task
In this compulsory task you will use pandas to select data from a dataset and explain the data retrieved for a given line of code.
In []: M import pandas as pd
You will use the same balance.txt dataset used in the example Jupyter notebook. Remember to ensure it is in the same folder as this notebook.
In[]: Mdf=pd.readcsv('balance.txt', sep='')
Write the code that performs the action described in the following statements.
In[]:
In[]: Select the 'Limit' and 'Rating' columns of the first five observations
In[]: Select the first five observations with 4 cards
Write a short explanation in the form of a comment for the following lines of code. For example:
# Selects the first 5 rows, and all of the columns for those rows.
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_2

Step: 3

blur-text-image_3

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

Modern Database Management

Authors: Heikki Topi, Jeffrey A Hoffer, Ramesh Venkataraman

13th Edition

0134773659, 978-0134773650

More Books

Students also viewed these Databases questions