Python For Data Science NPTEL Week 3 Assignment Answers (2024)

Are you looking for the Python for Data Science NPTEL Week 3 Assignment Answers 2024? You’ve come to the right place! This guide offers detailed solutions to the Week 3 assignment questions, helping you solidify your understanding of Python programming and its applications in data science.

Course Link: Click Here

Table of Contents

Python For Data Science NPTEL Week 3 Assignment Answers (1)

Python for Data Science Nptel Week 3 Assignment Answers (July-Dec 2024)

Q1. Which of the following is the correct approach to fill missing values in case of categorical variable?
Mean
median
Mode
None of the above

Answer: Mode

Q2. Of the following set of statements, which of them can be used to extract the column Type as a separate dataframe?
df_cars[[‘Type’]]
df_cars.iloc[[:, 1]
df_cars.loc[:, [‘Type’]]
None of the above

Answer : df_cars[[‘Type’]] , df_cars.loc[:, [‘Type’]]

For answers or latest updates join our telegram channel: Click here to join

These are Python for Data Science Nptel Week 3 Assignment Answers

Q3. The method df_cars.describe() will give description of which of the following column?
Car name
Brand
Price (in lakhs)
All of the above

Answer : Price (in lakhs)

Q4. Which pandas function is used to stack the dataframes vertically?
pd.merge()
pd.concat()
join()
None of the above

Answer: pd.concat()

For answers or latest updates join our telegram channel: Click here to join

These are Python for Data Science Nptel Week 3 Assignment Answers

Q5. Which of the following are libraries in Python?
Pandas
Matplotlib
NumPy
All of the above

Answer: All of the above

Q6. Which of the following variable have null values?
ID
Company
Review Date
Rating

Answer: Review Date

For answers or latest updates join our telegram channel: Click here to join

These are Python for Data Science Nptel Week 3 Assignment Answers

Q7.Which of the following countries have maximum locations of cocoa manufacturing companies?
U.K.
U.S.A.
Canada
France

Answer: U.S.A.

Q8. After checking the data summary, which feature requires a data conversion considering the data values held?
Rating
Review date
Company
Bean origin

Answer: Review date

For answers or latest updates join our telegram channel: Click here to join

These are Python for Data Science Nptel Week 3 Assignment Answers

Q9. What is the maximum rating of chocolates?
1.00
5.00
3.18
4.00

Answer: 5.00

Q10.What is the output of the following code?

[bool, int, float, float, str]
[str, int, float, float, str]
[bool, int, float, int, str]

[bool, int, int, float, str]

Answer: [bool, int, float, float, str]

Q11.What does df.info() provide?
Summary of the DataFrame, including the number of non-null entries.
The first 5 rows of the DataFrame
The data types of the columns
The correlation matrix of the DataFrame

Answer: Summary of the DataFrame, including the number of non-null entries.

Q12.What will be the output of the following code?

[1, 2]
[1, 3, 5]
[1, 2, 3, 4, 5]
[5, 4, 3, 2, 1]

Answer: [1, 3, 5]

For answers or latest updates join our telegram channel: Click here to join

These are Python for Data Science Nptel Week 3 Assignment Answers

Python for Data Science NPTEL All weeks: Click Here

More Nptel Courses: https://progiez.com/nptel-assignment-answers

Python for Data Science NPTEL Week 3 Assignment Answers (Jan-Apr 2024)

Course name: Python For Data Science

Course Link: Click Here

Q1. Which of the following is the correct approach to fill missing values in case of categorical variable?
Mean
Median
Mode
None of the above

Answer: Mode

Q2. Of the following set of statements, which of them can be used to extract the column Type as a separate dataframe?
df_cars[[‘Type’]]
df_cars.iloc[[:, 1]
df_cars.loc[:, [‘Type’]]
None of the above

Answer: a, c

Q3. The method df_cars.describe() will give description of which of the following column?
Car name
Brand
Price (in lakhs)
All of the above

Answer: Price (in lakhs)

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q4. Which pandas function is used to stack the dataframes vertically?
pd.merge()
pd.concat()
join()
None of the above

Answer: pd.concat()

Q5. Which of the following are libraries in Python?
Pandas
Matplotlib
NumPy
All of the above

Answer: All of the above

Q6. Which of the following variable have null values?
ID
Company
Review Date
Rating

Answer: Review Date

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q7. Which of the following countries have maximum locations of cocoa manufacturing companies?
U.K.
U.S.A.
Canada
France

Answer: U.S.A.

Q8. After checking the data summary, which feature requires a data conversion considering the data values held?
Rating
Review date
Company
Bean origin

Answer: Review date

Q9. What is the maximum rating of chocolates?
1.00
5.00
3.18
4.00

Answer: 5.00

Q10. What will be the output of the following code?
[bool, int, float, float, str]
[str, int, float, float, str]
[bool, int, float, int, str]
[bool, int, int, float, str]

Answer: [bool, int, float, float, str]

These are Python for Data Science NPTEL Week 3 Assignment Answers

More Weeks of Python for Data Science: Click here

More Nptel Courses: Click here

Python for Data Science NPTEL Week 3 Assignment Answers (Jan-Apr 2023)

Course Name: Python for Data Science

Course Link: Click Here

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q1. Which of the following is the correct approach to fill missing values in case of categorical variable?
a. Mean
b. Median
c. Mode
d. None of the above

Answer: c. Mode

Assume a pandas dataframe df_cars which when printed is as shown below. Based on this information, answer questions 2 and 3.

Q2. Of the following set of statements, which of them can be used to extract the column Type as a separate dataframe?
a. df cars[[’Type’]]
b. df cars.iloc[[:, 1]
c. df cars.loc[:, [’Type’]]
d. None of the above

Answer: a, c

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q3. The method df_cars.describe() will give description of which of the following column?
a. Car name
b. Brand
c. Price (in lakhs)
d. All of the above

Answer: c. Price (in lakhs)

Q4. Which pandas function is used to stack the dataframes vertically?
a. pd.merge()
b. pd.concat()
c. join()
d. None of the above

Answer: b. pd.concat()

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q5. Which of the following are liabraries in Python?
a. Pandas
b. Matplotlib
c. NumPy
d. All of the above

Answer: d. All of the above

Read the comma-separated values file hotel bookings.csv as a dataframe data hotel and answer questions 6 – 8. Please refer to Hotel Bookings Data Description.pdf for data and variable description.

Q6. Choose the appropriate command(s) to filter those booking details whose reservation-status are a No-show?

a.

b.

c.

d.

Answer: b, d

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q7. From the same data, find how many bookings were not canceled in the year 2017?
a. 9064
b. 6231
c. 9046
d. None of the above

Answer: a. 9064

Q9. From the total bookings that were made in 2017 and not canceled, which month had the highest number of repeated guests?
a. July
b. February
c. January
d. None of the above

Answer: a. July

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q9. What will be the output of the following code?

a. [bool, int, float, float, str]
b. [str, int, float, float, str]
c. [bool, int, float, int, str]
d. [bool, int, int, float, str]

Answer: a. [bool, int, float, float, str]

Q10. Which command is used to generate the plot shown below?

a. plt.plot(x, linestyle = “-”)
b. plt.plot(x, linestyle = “–”)
c. plt.plot(x, linestyle = “-.”)
d. plt.plot(x, linestyle = “:”)

Answer: a. plt.plot(x, linestyle = “-”)

These are Python for Data Science NPTEL Week 3 Assignment Answers

More Weeks of Python for Data Science NPTEL: Click here

More NPTEL courses: https://progiez.com/nptel

Python for Data Science NPTEL Week 3 Assignment Answers (July-Dec2022)

Course name: Python for Data Science

Link to Enroll: Click Here

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q1. Choose the appropriate command(s) to filter those booking details whose reservation_status are a No-show?
a. data_hotel_ns datahotel. loc[data_hotel.reservation_status=’No-Show’]
b. data_hotel_ns = data_hotel[ data _hotel. reservation_status = “No-Show’]
c. data hotel_ns = data_hotel. reservation_status.loc [data_hotel.isin([‘No-Show’])]
d. data_hotel_ns = data_hotel.loc [data hotel. reservation_status. isin([ No-Show’])]

Answer:b, d

Q2. From the same data, find how many bookings were not cancelled in the year 2017?

a. 9064
b. 6231
c. 9046
d. None of the above

Answer: a. 9064

Q3. From the total bookings that were made in 2017 and not cancelled, which month had the highest number of repeated guests?
a. July
b. February
c. January
d. None of the above

Answer: c. January

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q4. Which of the following commands can be used to create a variable Flag, and set the values as Premium when the rating is equal to or greater than 3.25, and otherwise as Regular?
a. dt_cocoa[°Flag’] = [“Premium” if x 3.25 else “Regular” for x in dt_cocoa[‘Rating’ ]]
b. dt_cocoa[“Flag’] = [“Premium” if x 3.25 else “Regular” for x in dt_cocoa[ _` Rating ‘]]
c. dt_cocoa[“Flag”] = np.where(dt_cocoa[ “Rating”] < 3.25, “Regular”, “Premium”)
d. None of the above

Answer: b, c

Q5. Which instruction can be used to impute the missing values in the column Review Data from the dataframe dt_cocoa by grouping the records company–wise?

Answer: a

Q6. After checking the data summary, which feature requires a data conversion considering the data values held?
a. Rating
b. Review Date
c. Company
d. None of the above

Answer: b. Review Date

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q7. What is the maximum average rating for the cocoa companies based out of Guatemala?
a. 43.
b. 53.
c. 42.
d. None of the above

Answer: c. 42.

Q8. Which pandas function is used to stack the dataframes vertically?
a. pd.merge()
b. pd.concat()
c. join()
d. None of the above

Answer: b. pd.concat()

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q9. Of the following set of statements, which of them can be used to extract the column Direction as a separate dataframe?

a. df_weather[[_`Direction ‘ ]]
b. df_weather.iloc[:,0]
c. df_weather.loc[:.[ ‘Direction ‘]]
d. None of the above

Answer: a, b

These are Python for Data Science NPTEL Week 3 Assignment Answers

Q10. Which one of these students’ average score across all subjects was the lowest? Which subject has the highest average score across students?

a. Harini, Maths
b. Sathi, Maths
c. Harini, Physics
d. Rekha, Maths

Answer: b. Sathi, Maths

These are Python for Data Science NPTEL Week 3 Assignment Answers

Similar:

  • All About NPTEL
  • Python for Data Science NPTEL Week 2 Assignment Answers
  • Python for Data Science NPTEL | Week 4
  • Python for Data Science NPTEL | Week 3
  • Python for Data Science NPTEL | Week 2
  • Python for Data Science NPTEL | Week 1
  • Python for Data Science | Week 1
Python For Data Science NPTEL Week 3 Assignment Answers (2024)

References

Top Articles
4.2: Linear Approximations and Differentials
Linear Approximation: AP Calculus Exam Review
Craigslist San Francisco Bay
Victor Spizzirri Linkedin
Tyler Sis 360 Louisiana Mo
Roblox Character Added
Bme Flowchart Psu
123Moviescloud
Slag bij Plataeae tussen de Grieken en de Perzen
Nier Automata Chapter Select Unlock
Evil Dead Rise Showtimes Near Regal Columbiana Grande
Samsung Galaxy S24 Ultra Negru dual-sim, 256 GB, 12 GB RAM - Telefon mobil la pret avantajos - Abonament - In rate | Digi Romania S.A.
Alexandria Van Starrenburg
Ostateillustrated Com Message Boards
Cyndaquil Gen 4 Learnset
List of all the Castle's Secret Stars - Super Mario 64 Guide - IGN
CDL Rostermania 2023-2024 | News, Rumors & Every Confirmed Roster
Daytonaskipthegames
Georgia Cash 3 Midday-Lottery Results & Winning Numbers
Masterkyngmash
48 Oz Equals How Many Quarts
Wiseloan Login
Everything To Know About N Scale Model Trains - My Hobby Models
Craigslist Wilkes Barre Pa Pets
fft - Fast Fourier transform
John Deere 44 Snowblower Parts Manual
Ordensfrau: Der Tod ist die Geburt in ein Leben bei Gott
Why comparing against exchange rates from Google is wrong
Nurofen 400mg Tabletten (24 stuks) | De Online Drogist
In Branch Chase Atm Near Me
Log in or sign up to view
Cdcs Rochester
Sam's Club Gas Prices Deptford Nj
Entry of the Globbots - 20th Century Electro​-​Synthesis, Avant Garde & Experimental Music 02;31,​07 - Volume II, by Various
Registrar Lls
2023 Fantasy Football Draft Guide: Rankings, cheat sheets and analysis
Owa Hilton Email
Courtney Roberson Rob Dyrdek
Sarahbustani Boobs
Fairbanks Auto Repair - University Chevron
Citizens Bank Park - Clio
Victoria Vesce Playboy
Menu Forest Lake – The Grillium Restaurant
Samsung 9C8
Sherwin Source Intranet
Ratchet And Clank Tools Of Destruction Rpcs3 Freeze
Premiumbukkake Tour
Pronósticos Gulfstream Park Nicoletti
Evil Dead Rise - Everything You Need To Know
Roller Znen ZN50QT-E
Runelite Ground Markers
Who We Are at Curt Landry Ministries
Latest Posts
Article information

Author: Merrill Bechtelar CPA

Last Updated:

Views: 6016

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Merrill Bechtelar CPA

Birthday: 1996-05-19

Address: Apt. 114 873 White Lodge, Libbyfurt, CA 93006

Phone: +5983010455207

Job: Legacy Representative

Hobby: Blacksmithing, Urban exploration, Sudoku, Slacklining, Creative writing, Community, Letterboxing

Introduction: My name is Merrill Bechtelar CPA, I am a clean, agreeable, glorious, magnificent, witty, enchanting, comfortable person who loves writing and wants to share my knowledge and understanding with you.