Wouldn't it be nice if we could combine our data on theme names with the number sets per theme?
Let's use the .merge() method to combine two separate DataFrames into one. The merge method works on columns with the same name in both DataFrames.
Currently, our theme_ids and our number of sets per theme live inside a Series called set_theme_count.

To make sure we have a column with the name id, I'll convert this Pandas Series into a Pandas DataFrame.

Here I'm providing a dictionary to create the DataFrame. The keys in the dictionary become my column names.
The Pandas .merge() function
To .merge() two DataFrame along a particular column, we need to provide our two DataFrames and then the column name on which to merge. This is why we set on='id'. Both our set_theme_count and our themes DataFrames have a column with this name.
merged_df = pd.merge(set_theme_count, themes, on='id')
The first 3 rows in our merged DataFrame look like this:

Aha! Star Wars is indeed the theme with the most LEGO sets. Let's plot the top 10 themes on a chart.
Creating a Bar Chart
Matplotlib can create almost any chart imaginable with very few lines of code. Using .bar() we can provide our theme names and the number of sets. This is what we get:

That worked, but it's almost unreadable. The good thing for us is that we already know how to customize our charts! Here's what we get when we increase the size of our figure, add some labels, and most importantly, rotate the category names on the x-axis so that they don't overlap.
plt.figure(figsize=(14,8))
plt.xticks(fontsize=14, rotation=45)
plt.yticks(fontsize=14)
plt.ylabel('Nr of Sets', fontsize=14)
plt.xlabel('Theme Name', fontsize=14)
plt.bar(merged_df.name[:10], merged_df.set_count[:10])
Niiiiice. So what can we see here? Well, a couple of these themes like Star Wars, Town, or Ninjago are what I would think of when I think of LEGO. However, it looks like LEGO also produces a huge number of ... books and key chains?!?! I guess I'm showing my age here, but it's interesting that the LEGO company seems to produce so much more these days than just plastic bricks. The 'Gear' category itself is huge and includes everything from bags to pencil cases apparently. Has LEGO strayed from its core business or is it successfully diversifying? That we can't answer from our dataset. I'll leave that one up to a business school case study to decide.