Generation

generate functionWed, 18 Jan 2023

Write a function that calculates the value_counts in the decade pandas column of the dataview if the rows in the rating column = 5.0 if av_rating[av_rating.rating == 5.0]: av_rating['decade'].value_counts() else: pass

def top_decade(av_rating): if av_rating[av_rating.rating == 5.0]: av_rating['decade'].value_counts() else: pass return av_rating top_decade(av_rating)

Want to kickstart your project?Use the new AI Studio to create your code