pandas groupby aggregation results from another dataframe
<p>I'm having trouble using <code>groupby</code> and <code>aggregation</code> when working w/ multiple dataframes. I'm trying to calculate <code>num_maint_over_$90</code> from two different dataframes.</p>

<pre><code>cars_dict = {"ABC123": ["Ford", "Compact_Car"], "XYZ148": ["Chevy", "Truck"], "ASX133": ["Ford", "Truck"], "ADS111": ["Porsche", "Sports_Car"], "SSC119": ["Toyota", "Compact_Car"]}
cars = pd.DataFrame.from_dict(cars_dict, orient = 'index')
cars.columns = ["Manufacturer", "Type"]
cars.index.rename("License_Plate", inplace = True)

maintenance_dict = {"License_Plate": ["ABC123", "ABC123", "ABC123", "XYZ148", "ASX133", "ASX133", "ADS111", "ADS111", "SSC119"], "Cost": [60, 100, 200, 150, 40, 199, 33, 99, 0]}
maintenance_records = pd.DataFrame.from_dict(maintenance_dict)
maintenance_records.index.rename("order_num", inplace = True)
</code></pre>

<p><strong>* cars: *</strong></p>

<pre><code>              Manufacturer         Type
License_Plate
XYZ148               Chevy        Truck
SSC119              Toyota  Compact_Car
ASX133                Ford        Truck
ABC123                Ford  Compact_Car
ADS111             Porsche   Sports_Car
</code></pre>

<p><strong>* maintenance_records: *</strong></p>

<pre><code>           Cost License_Plate
order_num
0            60        ABC123
1           100        ABC123
2           200        ABC123
3           150        XYZ148
4            40        ASX133
5           199        ASX133
6            33        ADS111
7            99        ADS111
8             0        SSC119
</code></pre>

<p><strong>*desired df: *</strong></p>

<pre><code>Type         num_maint_over_$90
Compact_Car  2
Sports_Car   1
Truck        2
</code></pre>

<p>I tried using <code>groupby</code>, <code>apply()</code>, and <code>for loop</code>.</p>