Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am making a bar plot to count the frequency of show genres for 20 shows. Using the following code, I am able to make

I am making a bar plot to count the frequency of show genres for 20 shows. Using the following code, I am able to make a nice plot but the several movies have their genres listed in the python df with commas in the middle (i.e,, if a movie has more than 1 genre then they are all included in the genre column with a "," separating them). That is why, when I make the plot, there are genre classes that include more than one genre in the plot but I want to divide them into one category so one movie that has more than one genre counts in the bar plot for each of the genres it is of and not as a separate genre category). Please tell me know to correct this error. Thank you

bar1 = df1['genres'].value_counts(normalize=True, ascending = False).plot(kind='barh',

title="Frequency of Genres of Top 10 Shows")

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

Database Design Query Formulation And Administration Using Oracle And PostgreSQL

Authors: Michael Mannino

8th Edition

1948426951, 978-1948426954

More Books

Students also viewed these Databases questions

Question

Employ effective vocal cues Employ effective visual cues

Answered: 1 week ago