Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When reading in the dataframe using the load csv function, one can see that it contains a lot of textual data which will not be

image text in transcribed
When reading in the dataframe using the load csv function, one can see that it contains a lot of textual data which will not be relevant for the numerical analyses in Part 1 and Part 2. Therefore, implement two functions drop cols and drop_cols na which remove some of the columns. Detailed instructions: [2 marks each] drop cols (df) : takes the dataframe as an input. It returns the reduced dataframe after dropping the following columns: N scrape_id, last_scraped', 'description", "listing_url' neighbourhood", 'calendar_last_ scraped amenities', 'neighborhood overview picture_url", "host_url": "host_about, hosti location hosttotal listings count host thumbnail url', 'host picture_url" host. verifications bathrooms text. Thas availability', 'minimum_minimum nights, maximum minimum nights minimum maximum nights maximum maximum nights minimum nights_avg_nem maximum nights avg_ntm number of reviews. 1300. calculated host_listings_count".cale ulated host listingsi.count entire homes calculated host listings_count_private rooms, alculated host listings_count shared rooms! drop_cols.na(df, threshold) : drop columns according to the amount of NaN values they contain threshold is a fraction between 0 and 1. If the fraction of NaNs in a column is equal or larger than the threshold, the respective columns is dropped. For

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

What information do you need?

Answered: 1 week ago

Question

Write an elaborate note on marketing environment.

Answered: 1 week ago

Question

LO14.2 Discuss how game theory relates to oligopoly.

Answered: 1 week ago