Trusted shop reviews

filtering

Trusted shop reviews

Etsy Pandas Interview Question

Etsy highlights trusted feedback on shop pages. A review is trusted when it gives five stars and comes from a verified purchase.

Using the reviews DataFrame, find every trusted review, showing its review_id and shop_id. Assign the answer to result.

Asked of

  • Data Analyst
  • Product Analyst
  • Business Analyst
  • Analytics Engineer
  • Data Scientist

reviewsDataFrame18 rows

Column NameType
review_idint64
shop_idint64
ratingint64
review_datestr
verified_purchasebool
helpful_votesint64

reviewsExample Input

review_idshop_idratingreview_dateverified_purchasehelpful_votes
90001410152024-03-02true12
90002410242024-03-02true3
90003410152024-03-03false0
90004410352024-03-04true7
90005410432024-03-04true1
90006410252024-03-05true9
90007410522024-03-06false0
90008410342024-03-06true2

Example Output

review_idshop_id
900014101
900044103
900064102

Explanation

Reviews 90001, 90004 and 90006 gave five stars and came from verified purchases. Review 90003 also gave five stars, but the purchase was not verified, so it is left out. The other reviews in the example gave fewer than five stars.

The example above is a small slice of the data. Your code runs against the full DataFrames.