
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h1 id="Movie-Genres">Movie Genres<a class="anchor-link" href="#Movie-Genres">&#182;</a></h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi condimentum, quam nec mollis interdum, mi eros porta nisl, non venenatis neque turpis et enim. Sed porttitor sapien id quam blandit, nec venenatis ipsum semper. Nulla facilisi. Ut non dui nec libero sodales posuere eget et odio. Duis ullamcorper sapien nec orci vehicula, sed blandit ante rhoncus. Aliquam erat volutpat. Mauris accumsan quam odio, a fringilla velit dapibus efficitur. Vestibulum tincidunt iaculis metus ut tristique.</p>
<p>Sed efficitur magna felis, ac ultricies arcu venenatis sed. Aenean accumsan interdum tortor, eu suscipit diam consequat at. Nullam pretium pharetra faucibus. Donec efficitur lacus quis sollicitudin pharetra. Duis at dolor sed est facilisis convallis eu et neque. Nullam nec dui sapien. Praesent rutrum congue purus sed convallis. Donec tincidunt maximus nulla, id luctus nunc lobortis sed. Donec non pellentesque mauris.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[1]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
<span class="kn">import</span> <span class="nn">seaborn</span> <span class="k">as</span> <span class="nn">sns</span>

<span class="kn">import</span> <span class="nn">settings</span>
<span class="kn">from</span> <span class="nn">etl</span> <span class="k">import</span> <span class="n">Data</span>
<span class="kn">import</span> <span class="nn">palettes</span>

<span class="o">%</span><span class="k">matplotlib</span> inline
<span class="n">sns</span><span class="o">.</span><span class="n">set_style</span><span class="p">(</span><span class="s2">&quot;white&quot;</span><span class="p">)</span>

<span class="n">data</span> <span class="o">=</span> <span class="n">Data</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[13]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1">## define dollar_formatter</span>
<span class="c1">## this was pulled from a personal libarary</span>
<span class="kn">from</span> <span class="nn">matplotlib.ticker</span> <span class="k">import</span> <span class="n">FuncFormatter</span>
<span class="kn">import</span> <span class="nn">math</span>

<span class="k">def</span> <span class="nf">millify</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">pos</span><span class="o">=</span><span class="mi">1</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;</span>
<span class="sd">    Function to shorten long numbers as strings with alphabetical scale designator.  This function was taken from a</span>
<span class="sd">    stack overflow post a long time ago.  I have since modified it slightly but is still fairly true to to original.</span>

<span class="sd">    :param n: number to millify</span>
<span class="sd">    :param pos: Ignore the passed in position. This has the effect of scaling the default tick locations.</span>
<span class="sd">    :return:</span>

<span class="sd">    Examples:</span>

<span class="sd">    .. ipython:: python</span>

<span class="sd">        import pea</span>
<span class="sd">        import pandas as pd</span>
<span class="sd">        print(pea.millify(1234567))</span>
<span class="sd">        print(pea.millify(1234567890))</span>
<span class="sd">        bigdf = pd.DataFrame({&#39;Big Numbers&#39;:[123, 123456, 123456789, 1234567890]})</span>
<span class="sd">        bigdf[&#39;millified&#39;] = bigdf[&#39;Big Numbers&#39;].apply(lambda x: pea.millify(x))</span>
<span class="sd">        bigdf</span>

<span class="sd">    &quot;&quot;&quot;</span>

    <span class="n">n</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">n</span><span class="p">)</span>

    <span class="n">mill_names</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;  &#39;</span><span class="p">,</span> <span class="s1">&#39; K&#39;</span><span class="p">,</span> <span class="s1">&#39; M&#39;</span><span class="p">,</span> <span class="s1">&#39; B&#39;</span><span class="p">,</span> <span class="s1">&#39; T&#39;</span><span class="p">]</span>

    <span class="n">millidx</span> <span class="o">=</span> <span class="nb">max</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="nb">min</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">mill_names</span><span class="p">)</span> <span class="o">-</span> <span class="mi">1</span><span class="p">,</span>
                         <span class="nb">float</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">floor</span><span class="p">(</span><span class="mi">0</span> <span class="k">if</span> <span class="n">n</span> <span class="o">==</span> <span class="mi">0</span> <span class="k">else</span> <span class="n">math</span><span class="o">.</span><span class="n">log10</span><span class="p">(</span><span class="nb">abs</span><span class="p">(</span><span class="n">n</span><span class="p">))</span> <span class="o">/</span> <span class="mi">3</span><span class="p">))))</span>

    <span class="n">milled</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:.2f}{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">n</span> <span class="o">/</span> <span class="mi">10</span> <span class="o">**</span> <span class="p">(</span><span class="mi">3</span> <span class="o">*</span> <span class="n">millidx</span><span class="p">),</span> <span class="n">mill_names</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">millidx</span><span class="p">)])</span>

    <span class="k">if</span> <span class="n">milled</span><span class="p">[</span><span class="o">-</span><span class="mi">3</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;0&#39;</span><span class="p">:</span>
        <span class="n">milled</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:.1f}{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">n</span> <span class="o">/</span> <span class="mi">10</span> <span class="o">**</span> <span class="p">(</span><span class="mi">3</span> <span class="o">*</span> <span class="n">millidx</span><span class="p">),</span> <span class="n">mill_names</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">millidx</span><span class="p">)])</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span>
    <span class="k">if</span> <span class="n">milled</span><span class="p">[</span><span class="o">-</span><span class="mi">4</span><span class="p">]</span> <span class="o">==</span> <span class="s1">&#39;0&#39;</span><span class="p">:</span>
        <span class="n">milled</span> <span class="o">=</span> <span class="s1">&#39;</span><span class="si">{:.0f}{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">n</span> <span class="o">/</span> <span class="mi">10</span> <span class="o">**</span> <span class="p">(</span><span class="mi">3</span> <span class="o">*</span> <span class="n">millidx</span><span class="p">),</span> <span class="n">mill_names</span><span class="p">[</span><span class="nb">int</span><span class="p">(</span><span class="n">millidx</span><span class="p">)])</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span>

    <span class="k">return</span> <span class="n">milled</span>

<span class="k">def</span> <span class="nf">to_dollars</span><span class="p">(</span><span class="n">y</span><span class="p">,</span> <span class="n">position</span><span class="o">=</span><span class="mi">1</span><span class="p">):</span>
    <span class="n">s</span> <span class="o">=</span> <span class="n">millify</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
    <span class="k">return</span> <span class="s1">&#39;$&#39;</span> <span class="o">+</span> <span class="n">s</span>

<span class="n">dollar_formatter</span> <span class="o">=</span> <span class="n">FuncFormatter</span><span class="p">(</span><span class="n">to_dollars</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[3]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">genres</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">genre</span><span class="p">[</span><span class="s1">&#39;genres&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">drop_duplicates</span><span class="p">()</span><span class="o">.</span><span class="n">values</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>

<span class="n">genre_counts</span> <span class="o">=</span> <span class="p">{</span><span class="s1">&#39;genre&#39;</span><span class="p">:</span> <span class="p">[],</span> <span class="s1">&#39;count&#39;</span><span class="p">:</span> <span class="p">[]}</span>
<span class="k">for</span> <span class="n">genre</span> <span class="ow">in</span> <span class="n">genres</span><span class="p">:</span>
    <span class="n">genre_counts</span><span class="p">[</span><span class="s1">&#39;genre&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">genre</span><span class="p">)</span>
    <span class="n">genre_counts</span><span class="p">[</span><span class="s1">&#39;count&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">genre</span><span class="o">=</span><span class="n">genre</span><span class="p">)</span><span class="o">.</span><span class="n">movie</span><span class="p">))</span>

<span class="n">genre_df</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">genre_counts</span><span class="p">)</span><span class="o">.</span><span class="n">sort_values</span><span class="p">(</span><span class="s1">&#39;count&#39;</span><span class="p">)</span>

<span class="n">genre_bar</span> <span class="o">=</span> <span class="p">(</span><span class="n">genre_df</span>
             <span class="o">.</span><span class="n">set_index</span><span class="p">(</span><span class="s1">&#39;genre&#39;</span><span class="p">)</span>
             <span class="o">.</span><span class="n">plot</span><span class="p">(</span><span class="n">kind</span><span class="o">=</span><span class="s1">&#39;barh&#39;</span><span class="p">,</span>
                   <span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">10</span><span class="p">),</span>
                   <span class="n">title</span><span class="o">=</span><span class="s1">&#39;Count of titles by genre&#39;</span><span class="p">,</span>
                   <span class="n">legend</span><span class="o">=</span><span class="kc">False</span><span class="p">))</span>
<span class="n">sns</span><span class="o">.</span><span class="n">despine</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt"></div>




<div class="output_png output_subarea ">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT4AAAJMCAYAAABjOspnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
[encoded data, 28105 characters]
Ipaj4hMRy/k/84SwywTh56QAAAAASUVORK5CYII=
"
>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[4]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">genre_df</span><span class="o">.</span><span class="n">set_index</span><span class="p">(</span><span class="s1">&#39;genre&#39;</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt output_prompt">Out[4]:</div>



<div class="output_html rendered_html output_subarea output_execute_result">
<div>
<style>
    .dataframe thead tr:only-child th {
        text-align: right;
    }

    .dataframe thead th {
        text-align: left;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>count</th>
    </tr>
    <tr>
      <th>genre</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>Game-Show</th>
      <td>1</td>
    </tr>
    <tr>
      <th>Reality-TV</th>
      <td>2</td>
    </tr>
    <tr>
      <th>News</th>
      <td>3</td>
    </tr>
    <tr>
      <th>Short</th>
      <td>5</td>
    </tr>
    <tr>
      <th>Film-Noir</th>
      <td>6</td>
    </tr>
    <tr>
      <th>Western</th>
      <td>97</td>
    </tr>
    <tr>
      <th>Documentary</th>
      <td>121</td>
    </tr>
    <tr>
      <th>Musical</th>
      <td>132</td>
    </tr>
    <tr>
      <th>Sport</th>
      <td>182</td>
    </tr>
    <tr>
      <th>History</th>
      <td>207</td>
    </tr>
    <tr>
      <th>War</th>
      <td>213</td>
    </tr>
    <tr>
      <th>Music</th>
      <td>214</td>
    </tr>
    <tr>
      <th>Animation</th>
      <td>242</td>
    </tr>
    <tr>
      <th>Biography</th>
      <td>293</td>
    </tr>
    <tr>
      <th>Mystery</th>
      <td>500</td>
    </tr>
    <tr>
      <th>Family</th>
      <td>546</td>
    </tr>
    <tr>
      <th>Horror</th>
      <td>565</td>
    </tr>
    <tr>
      <th>Fantasy</th>
      <td>610</td>
    </tr>
    <tr>
      <th>Sci-Fi</th>
      <td>616</td>
    </tr>
    <tr>
      <th>Crime</th>
      <td>889</td>
    </tr>
    <tr>
      <th>Adventure</th>
      <td>923</td>
    </tr>
    <tr>
      <th>Romance</th>
      <td>1107</td>
    </tr>
    <tr>
      <th>Action</th>
      <td>1153</td>
    </tr>
    <tr>
      <th>Thriller</th>
      <td>1411</td>
    </tr>
    <tr>
      <th>Comedy</th>
      <td>1872</td>
    </tr>
    <tr>
      <th>Drama</th>
      <td>2594</td>
    </tr>
  </tbody>
</table>
</div>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi condimentum, quam nec mollis interdum, mi eros porta nisl, non venenatis neque turpis et enim. Sed porttitor sapien id quam blandit, nec venenatis ipsum semper. Nulla facilisi. Ut non dui nec libero sodales posuere eget et odio. Duis ullamcorper sapien nec orci vehicula, sed blandit ante rhoncus. Aliquam erat volutpat. Mauris accumsan quam odio, a fringilla velit dapibus efficitur. Vestibulum tincidunt iaculis metus ut tristique.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[5]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">n_genres</span> <span class="o">=</span> <span class="mi">5</span>
<span class="n">top_genres</span> <span class="o">=</span> <span class="p">(</span><span class="n">genre_df</span>
              <span class="o">.</span><span class="n">sort_values</span><span class="p">(</span><span class="s1">&#39;count&#39;</span><span class="p">,</span> <span class="n">ascending</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
              <span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="n">n_genres</span><span class="p">)[</span><span class="s1">&#39;genre&#39;</span><span class="p">]</span>
              <span class="o">.</span><span class="n">values</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
             <span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[6]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">frames</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">genre</span> <span class="ow">in</span> <span class="n">top_genres</span><span class="p">:</span>
    <span class="n">df</span> <span class="o">=</span> <span class="n">data</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">genre</span><span class="o">=</span><span class="n">genre</span><span class="p">)</span><span class="o">.</span><span class="n">movie</span>
    <span class="n">df</span><span class="p">[</span><span class="s1">&#39;genre&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">genre</span>
    <span class="n">frames</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">df</span><span class="p">)</span>
    
<span class="n">movie</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">frames</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[7]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">genre_pairdf</span> <span class="o">=</span> <span class="n">movie</span><span class="p">[[</span><span class="s1">&#39;gross&#39;</span><span class="p">,</span> 
            <span class="s1">&#39;genre&#39;</span><span class="p">,</span>
<span class="c1">#             &#39;budget&#39;,</span>
<span class="c1">#        &#39;net&#39;,</span>
<span class="c1">#        &#39;director_facebook_likes&#39;, </span>
<span class="c1">#        &#39;actor_3_facebook_likes&#39;, </span>
<span class="c1">#        &#39;actor_2_facebook_likes&#39;, </span>
<span class="c1">#        &#39;actor_1_facebook_likes&#39;,</span>
<span class="c1">#       &#39;cast_total_facebook_likes&#39;,</span>
      <span class="s1">&#39;movie_facebook_likes&#39;</span><span class="p">,</span>
      <span class="s1">&#39;imdb_score&#39;</span><span class="p">,</span>
      <span class="p">]]</span><span class="o">.</span><span class="n">dropna</span><span class="p">()</span>
<span class="c1"># genre_pairdf = genre_pairdf.stack().reset_index().drop([&#39;level_0&#39;], axis=1).rename({&#39;level_1&#39;:&#39;metric&#39;, 0:&#39;value&#39;})</span>
<span class="n">genre_pairplot</span> <span class="o">=</span> <span class="n">sns</span><span class="o">.</span><span class="n">pairplot</span><span class="p">(</span>
    <span class="n">genre_pairdf</span><span class="p">,</span> 
    <span class="n">hue</span><span class="o">=</span><span class="s1">&#39;genre&#39;</span><span class="p">,</span>
<span class="n">palette</span><span class="o">=</span><span class="n">palettes</span><span class="o">.</span><span class="n">dvd</span><span class="p">,</span>
<span class="p">)</span>
<span class="n">sns</span><span class="o">.</span><span class="n">despine</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt"></div>




<div class="output_png output_subarea ">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnYAAAIbCAYAAABmPtN9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
[encoded data, 125202 characters]
"
>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[8]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">df</span><span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt output_prompt">Out[8]:</div>



<div class="output_html rendered_html output_subarea output_execute_result">
<div>
<style>
    .dataframe thead tr:only-child th {
        text-align: right;
    }

    .dataframe thead th {
        text-align: left;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>color</th>
      <th>director_name</th>
      <th>num_critic_for_reviews</th>
      <th>duration</th>
      <th>director_facebook_likes</th>
      <th>actor_3_facebook_likes</th>
      <th>actor_2_name</th>
      <th>actor_1_facebook_likes</th>
      <th>gross</th>
      <th>genres</th>
      <th>...</th>
      <th>content_rating</th>
      <th>budget</th>
      <th>title_year</th>
      <th>actor_2_facebook_likes</th>
      <th>imdb_score</th>
      <th>aspect_ratio</th>
      <th>movie_facebook_likes</th>
      <th>net</th>
      <th>profitable</th>
      <th>genre</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>4049</th>
      <td>Color</td>
      <td>Frank Capra</td>
      <td>206.0</td>
      <td>118.0</td>
      <td>964.0</td>
      <td>248.0</td>
      <td>Lionel Barrymore</td>
      <td>488.0</td>
      <td>NaN</td>
      <td>Drama|Family|Fantasy|Romance</td>
      <td>...</td>
      <td>PG</td>
      <td>3180000.0</td>
      <td>1946-01-01</td>
      <td>275.0</td>
      <td>8.6</td>
      <td>1.37</td>
      <td>41000</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4526</th>
      <td>Color</td>
      <td>Michael Curtiz</td>
      <td>242.0</td>
      <td>82.0</td>
      <td>345.0</td>
      <td>269.0</td>
      <td>Claude Rains</td>
      <td>2000.0</td>
      <td>NaN</td>
      <td>Drama|Romance|War</td>
      <td>...</td>
      <td>PG</td>
      <td>950000.0</td>
      <td>1942-01-01</td>
      <td>607.0</td>
      <td>8.6</td>
      <td>1.37</td>
      <td>23000</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>283</th>
      <td>Color</td>
      <td>Ridley Scott</td>
      <td>265.0</td>
      <td>171.0</td>
      <td>0.0</td>
      <td>695.0</td>
      <td>Connie Nielsen</td>
      <td>3000.0</td>
      <td>187670866.0</td>
      <td>Action|Drama|Romance</td>
      <td>...</td>
      <td>R</td>
      <td>103000000.0</td>
      <td>2000-01-01</td>
      <td>933.0</td>
      <td>8.5</td>
      <td>2.35</td>
      <td>21000</td>
      <td>84670866.0</td>
      <td>1</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>1035</th>
      <td>Color</td>
      <td>NaN</td>
      <td>30.0</td>
      <td>64.0</td>
      <td>NaN</td>
      <td>184.0</td>
      <td>Graham McTavish</td>
      <td>1000.0</td>
      <td>NaN</td>
      <td>Drama|Romance|Sci-Fi</td>
      <td>...</td>
      <td>TV-MA</td>
      <td>NaN</td>
      <td>NaT</td>
      <td>531.0</td>
      <td>8.5</td>
      <td>16.00</td>
      <td>31000</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>3685</th>
      <td>Color</td>
      <td>Rakeysh Omprakash Mehra</td>
      <td>33.0</td>
      <td>157.0</td>
      <td>85.0</td>
      <td>199.0</td>
      <td>Steven Mackintosh</td>
      <td>397.0</td>
      <td>2197331.0</td>
      <td>Comedy|Drama|History|Romance</td>
      <td>...</td>
      <td>Not Rated</td>
      <td>NaN</td>
      <td>2006-01-01</td>
      <td>227.0</td>
      <td>8.4</td>
      <td>2.35</td>
      <td>0</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>1298</th>
      <td>Black and White</td>
      <td>Jean-Pierre Jeunet</td>
      <td>242.0</td>
      <td>122.0</td>
      <td>0.0</td>
      <td>54.0</td>
      <td>Jamel Debbouze</td>
      <td>326.0</td>
      <td>33201661.0</td>
      <td>Comedy|Romance</td>
      <td>...</td>
      <td>R</td>
      <td>77000000.0</td>
      <td>2001-01-01</td>
      <td>326.0</td>
      <td>8.4</td>
      <td>2.35</td>
      <td>39000</td>
      <td>-43798339.0</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>3661</th>
      <td>Color</td>
      <td>NaN</td>
      <td>15.0</td>
      <td>25.0</td>
      <td>NaN</td>
      <td>220.0</td>
      <td>Belinda Stewart-Wilson</td>
      <td>229.0</td>
      <td>NaN</td>
      <td>Comedy|Romance</td>
      <td>...</td>
      <td>TV-14</td>
      <td>NaN</td>
      <td>NaT</td>
      <td>223.0</td>
      <td>8.4</td>
      <td>16.00</td>
      <td>0</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4155</th>
      <td>Black and White</td>
      <td>Billy Wilder</td>
      <td>181.0</td>
      <td>120.0</td>
      <td>0.0</td>
      <td>102.0</td>
      <td>Joe E. Brown</td>
      <td>105.0</td>
      <td>25000000.0</td>
      <td>Comedy|Music|Romance</td>
      <td>...</td>
      <td>Not Rated</td>
      <td>2883848.0</td>
      <td>1959-01-01</td>
      <td>103.0</td>
      <td>8.3</td>
      <td>1.66</td>
      <td>10000</td>
      <td>22116152.0</td>
      <td>1</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4885</th>
      <td>Black and White</td>
      <td>King Vidor</td>
      <td>48.0</td>
      <td>151.0</td>
      <td>54.0</td>
      <td>6.0</td>
      <td>Renée Adorée</td>
      <td>81.0</td>
      <td>NaN</td>
      <td>Drama|Romance|War</td>
      <td>...</td>
      <td>Not Rated</td>
      <td>245000.0</td>
      <td>1925-01-01</td>
      <td>12.0</td>
      <td>8.3</td>
      <td>1.33</td>
      <td>226</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4069</th>
      <td>Black and White</td>
      <td>Billy Wilder</td>
      <td>183.0</td>
      <td>125.0</td>
      <td>0.0</td>
      <td>180.0</td>
      <td>Ray Walston</td>
      <td>516.0</td>
      <td>NaN</td>
      <td>Comedy|Drama|Romance</td>
      <td>...</td>
      <td>Approved</td>
      <td>3000000.0</td>
      <td>1960-01-01</td>
      <td>417.0</td>
      <td>8.3</td>
      <td>2.35</td>
      <td>0</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4178</th>
      <td>Color</td>
      <td>Stanley Donen</td>
      <td>169.0</td>
      <td>103.0</td>
      <td>134.0</td>
      <td>390.0</td>
      <td>Debbie Reynolds</td>
      <td>804.0</td>
      <td>NaN</td>
      <td>Comedy|Musical|Romance</td>
      <td>...</td>
      <td>Approved</td>
      <td>2540800.0</td>
      <td>1952-01-01</td>
      <td>786.0</td>
      <td>8.3</td>
      <td>1.37</td>
      <td>0</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>2223</th>
      <td>Color</td>
      <td>Michel Gondry</td>
      <td>273.0</td>
      <td>108.0</td>
      <td>1000.0</td>
      <td>1000.0</td>
      <td>Kirsten Dunst</td>
      <td>14000.0</td>
      <td>34126138.0</td>
      <td>Drama|Fantasy|Romance|Sci-Fi</td>
      <td>...</td>
      <td>R</td>
      <td>20000000.0</td>
      <td>2004-01-01</td>
      <td>4000.0</td>
      <td>8.3</td>
      <td>1.85</td>
      <td>52000</td>
      <td>14126138.0</td>
      <td>1</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>3650</th>
      <td>Color</td>
      <td>NaN</td>
      <td>10.0</td>
      <td>240.0</td>
      <td>NaN</td>
      <td>334.0</td>
      <td>Blake Ritson</td>
      <td>805.0</td>
      <td>NaN</td>
      <td>Comedy|Drama|Romance</td>
      <td>...</td>
      <td>NaN</td>
      <td>NaN</td>
      <td>NaT</td>
      <td>432.0</td>
      <td>8.2</td>
      <td>1.78</td>
      <td>0</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>3604</th>
      <td>Color</td>
      <td>NaN</td>
      <td>10.0</td>
      <td>NaN</td>
      <td>NaN</td>
      <td>502.0</td>
      <td>Tuppence Middleton</td>
      <td>1000.0</td>
      <td>NaN</td>
      <td>Drama|History|Romance|War</td>
      <td>...</td>
      <td>TV-14</td>
      <td>NaN</td>
      <td>NaT</td>
      <td>888.0</td>
      <td>8.2</td>
      <td>16.00</td>
      <td>11000</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>3970</th>
      <td>Color</td>
      <td>Victor Fleming</td>
      <td>157.0</td>
      <td>226.0</td>
      <td>149.0</td>
      <td>248.0</td>
      <td>George Reeves</td>
      <td>503.0</td>
      <td>198655278.0</td>
      <td>Drama|History|Romance|War</td>
      <td>...</td>
      <td>G</td>
      <td>3977000.0</td>
      <td>1939-01-01</td>
      <td>384.0</td>
      <td>8.2</td>
      <td>1.37</td>
      <td>16000</td>
      <td>194678278.0</td>
      <td>1</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>3490</th>
      <td>Color</td>
      <td>NaN</td>
      <td>96.0</td>
      <td>44.0</td>
      <td>NaN</td>
      <td>970.0</td>
      <td>Alyson Hannigan</td>
      <td>4000.0</td>
      <td>NaN</td>
      <td>Action|Drama|Fantasy|Romance</td>
      <td>...</td>
      <td>TV-14</td>
      <td>2300000.0</td>
      <td>NaT</td>
      <td>3000.0</td>
      <td>8.2</td>
      <td>1.33</td>
      <td>6000</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4824</th>
      <td>Black and White</td>
      <td>Frank Capra</td>
      <td>124.0</td>
      <td>65.0</td>
      <td>964.0</td>
      <td>21.0</td>
      <td>Alan Hale</td>
      <td>380.0</td>
      <td>NaN</td>
      <td>Comedy|Romance</td>
      <td>...</td>
      <td>Unrated</td>
      <td>325000.0</td>
      <td>1934-01-01</td>
      <td>114.0</td>
      <td>8.2</td>
      <td>1.37</td>
      <td>0</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4160</th>
      <td>Color</td>
      <td>Rajkumar Hirani</td>
      <td>15.0</td>
      <td>144.0</td>
      <td>124.0</td>
      <td>327.0</td>
      <td>Sanjay Dutt</td>
      <td>464.0</td>
      <td>NaN</td>
      <td>Comedy|Drama|Romance</td>
      <td>...</td>
      <td>PG-13</td>
      <td>120000000.0</td>
      <td>2006-01-01</td>
      <td>426.0</td>
      <td>8.2</td>
      <td>2.35</td>
      <td>349</td>
      <td>NaN</td>
      <td>0</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4638</th>
      <td>Black and White</td>
      <td>Elia Kazan</td>
      <td>134.0</td>
      <td>108.0</td>
      <td>603.0</td>
      <td>279.0</td>
      <td>Karl Malden</td>
      <td>10000.0</td>
      <td>9600000.0</td>
      <td>Crime|Drama|Romance</td>
      <td>...</td>
      <td>Not Rated</td>
      <td>910000.0</td>
      <td>1954-01-01</td>
      <td>416.0</td>
      <td>8.2</td>
      <td>1.85</td>
      <td>0</td>
      <td>8690000.0</td>
      <td>1</td>
      <td>Romance</td>
    </tr>
    <tr>
      <th>4238</th>
      <td>Black and White</td>
      <td>William Wyler</td>
      <td>97.0</td>
      <td>172.0</td>
      <td>355.0</td>
      <td>188.0</td>
      <td>Teresa Wright</td>
      <td>749.0</td>
      <td>23650000.0</td>
      <td>Drama|Romance|War</td>
      <td>...</td>
      <td>Not Rated</td>
      <td>2100000.0</td>
      <td>1946-01-01</td>
      <td>208.0</td>
      <td>8.1</td>
      <td>1.37</td>
      <td>0</td>
      <td>21550000.0</td>
      <td>1</td>
      <td>Romance</td>
    </tr>
  </tbody>
</table>
<p>20 rows × 31 columns</p>
</div>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi condimentum, quam nec mollis interdum, mi eros porta nisl, non venenatis neque turpis et enim. Sed porttitor sapien id quam blandit, nec venenatis ipsum semper. Nulla facilisi. Ut non dui nec libero sodales posuere eget et odio. Duis ullamcorper sapien nec orci vehicula, sed blandit ante rhoncus. Aliquam erat volutpat. Mauris accumsan quam odio, a fringilla velit dapibus efficitur. Vestibulum tincidunt iaculis metus ut tristique.</p>
<p>Sed efficitur magna felis, ac ultricies arcu venenatis sed. Aenean accumsan interdum tortor, eu suscipit diam consequat at. Nullam pretium pharetra faucibus. Donec efficitur lacus quis sollicitudin pharetra. Duis at dolor sed est facilisis convallis eu et neque. Nullam nec dui sapien. Praesent rutrum congue purus sed convallis. Donec tincidunt maximus nulla, id luctus nunc lobortis sed. Donec non pellentesque mauris.</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[14]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">violin_df</span> <span class="o">=</span> <span class="p">(</span>
             <span class="n">movie</span>
             <span class="p">[[</span><span class="s1">&#39;genre&#39;</span><span class="p">,</span> <span class="s1">&#39;gross&#39;</span><span class="p">,</span> <span class="s1">&#39;net&#39;</span><span class="p">]]</span>
             <span class="o">.</span><span class="n">set_index</span><span class="p">(</span><span class="s1">&#39;genre&#39;</span><span class="p">)</span>
             <span class="o">.</span><span class="n">unstack</span><span class="p">()</span>
             <span class="o">.</span><span class="n">reset_index</span><span class="p">()</span>
             <span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;level_0&#39;</span><span class="p">:</span> <span class="s1">&#39;metric&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">:</span> <span class="s1">&#39;value&#39;</span><span class="p">})</span>
             <span class="p">)</span>
<span class="n">ax</span> <span class="o">=</span> <span class="n">sns</span><span class="o">.</span><span class="n">violinplot</span><span class="p">(</span>
                    <span class="n">data</span><span class="o">=</span><span class="n">violin_df</span><span class="p">,</span> 
                    <span class="n">x</span><span class="o">=</span><span class="s1">&#39;genre&#39;</span><span class="p">,</span> 
                    <span class="n">y</span><span class="o">=</span><span class="s1">&#39;value&#39;</span><span class="p">,</span>
                    <span class="n">hue</span><span class="o">=</span><span class="s1">&#39;metric&#39;</span><span class="p">,</span> 
                    <span class="n">split</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
                    <span class="n">title</span><span class="o">=</span><span class="n">f</span><span class="s1">&#39;Net vs. gross profit comparison for top </span><span class="si">{n_genres}</span><span class="s1">&#39;</span><span class="p">,</span>
                    <span class="n">palette</span><span class="o">=</span><span class="n">palettes</span><span class="o">.</span><span class="n">dvd</span>
                   <span class="p">)</span>
<span class="n">ax</span><span class="o">.</span><span class="n">figure</span><span class="o">.</span><span class="n">set_size_inches</span><span class="p">(</span><span class="mf">11.7</span><span class="p">,</span> <span class="mf">8.27</span><span class="p">)</span>
<span class="n">ax</span><span class="o">.</span><span class="n">set_ylim</span><span class="p">((</span><span class="o">-</span><span class="mi">200000000</span><span class="p">,</span> <span class="mi">300000000</span><span class="p">))</span>
<span class="n">ax</span><span class="o">.</span><span class="n">yaxis</span><span class="o">.</span><span class="n">set_major_formatter</span><span class="p">(</span><span class="n">dollar_formatter</span><span class="p">)</span>
<span class="n">sns</span><span class="o">.</span><span class="n">despine</span><span class="p">(</span><span class="n">left</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">bottom</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt"></div>




<div class="output_png output_subarea ">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtcAAAHxCAYAAACmk5DrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
[encoded data, 44275 characters]
YII=
"
>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[15]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">violin_df</span><span class="o">.</span><span class="n">head</span><span class="p">(</span><span class="mi">20</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt output_prompt">Out[15]:</div>



<div class="output_html rendered_html output_subarea output_execute_result">
<div>
<style>
    .dataframe thead tr:only-child th {
        text-align: right;
    }

    .dataframe thead th {
        text-align: left;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>metric</th>
      <th>genre</th>
      <th>value</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>gross</td>
      <td>Drama</td>
      <td>28341469.0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>gross</td>
      <td>Drama</td>
      <td>134821952.0</td>
    </tr>
    <tr>
      <th>2</th>
      <td>gross</td>
      <td>Drama</td>
      <td>447093.0</td>
    </tr>
    <tr>
      <th>3</th>
      <td>gross</td>
      <td>Drama</td>
      <td>447093.0</td>
    </tr>
    <tr>
      <th>4</th>
      <td>gross</td>
      <td>Drama</td>
      <td>533316061.0</td>
    </tr>
    <tr>
      <th>5</th>
      <td>gross</td>
      <td>Drama</td>
      <td>57300000.0</td>
    </tr>
    <tr>
      <th>6</th>
      <td>gross</td>
      <td>Drama</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>7</th>
      <td>gross</td>
      <td>Drama</td>
      <td>107930000.0</td>
    </tr>
    <tr>
      <th>8</th>
      <td>gross</td>
      <td>Drama</td>
      <td>96067179.0</td>
    </tr>
    <tr>
      <th>9</th>
      <td>gross</td>
      <td>Drama</td>
      <td>377019252.0</td>
    </tr>
    <tr>
      <th>10</th>
      <td>gross</td>
      <td>Drama</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>11</th>
      <td>gross</td>
      <td>Drama</td>
      <td>313837577.0</td>
    </tr>
    <tr>
      <th>12</th>
      <td>gross</td>
      <td>Drama</td>
      <td>329691196.0</td>
    </tr>
    <tr>
      <th>13</th>
      <td>gross</td>
      <td>Drama</td>
      <td>37023395.0</td>
    </tr>
    <tr>
      <th>14</th>
      <td>gross</td>
      <td>Drama</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>15</th>
      <td>gross</td>
      <td>Drama</td>
      <td>NaN</td>
    </tr>
    <tr>
      <th>16</th>
      <td>gross</td>
      <td>Drama</td>
      <td>112000000.0</td>
    </tr>
    <tr>
      <th>17</th>
      <td>gross</td>
      <td>Drama</td>
      <td>46836394.0</td>
    </tr>
    <tr>
      <th>18</th>
      <td>gross</td>
      <td>Drama</td>
      <td>340478898.0</td>
    </tr>
    <tr>
      <th>19</th>
      <td>gross</td>
      <td>Drama</td>
      <td>269061.0</td>
    </tr>
  </tbody>
</table>
</div>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing text_cell rendered"><div class="prompt input_prompt">
</div>
<div class="inner_cell">
<div class="text_cell_render border-box-sizing rendered_html">
<h2 id="Heatmap">Heatmap<a class="anchor-link" href="#Heatmap">&#182;</a></h2><p>In this section a heatmap will be used to visually look for strong correlations.  This can be very useful for beginning an analysis</p>
<h3 id="Notes">Notes<a class="anchor-link" href="#Notes">&#182;</a></h3><p><strong>No Correlations</strong></p>
<ul>
<li>aspect ratio</li>
<li>fasenumber in poster</li>
</ul>
<p><strong>Strong Correlations</strong></p>
<p>budget to net</p>
<p>actor 1, 2, 3 facebook likes to cast total facebook likes</p>

</div>
</div>
</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[16]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">heatmap</span> <span class="o">=</span> <span class="n">sns</span><span class="o">.</span><span class="n">heatmap</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">movie</span><span class="o">.</span><span class="n">corr</span><span class="p">(),</span> <span class="n">annot</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">linewidths</span><span class="o">=</span><span class="mf">0.5</span><span class="p">)</span>
<span class="n">heatmap</span><span class="o">.</span><span class="n">figure</span><span class="o">.</span><span class="n">set_size_inches</span><span class="p">(</span><span class="mf">11.7</span><span class="p">,</span> <span class="mf">8.27</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt"></div>




<div class="output_png output_subarea ">
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAuUAAAJKCAYAAACLcDvFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
[encoded data, 193193 characters]
6i/KzVToAAAAAElFTkSuQmCC
"
>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[17]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">data</span><span class="o">.</span><span class="n">movie</span><span class="o">.</span><span class="n">corr</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area">

<div class="prompt output_prompt">Out[17]:</div>



<div class="output_html rendered_html output_subarea output_execute_result">
<div>
<style>
    .dataframe thead tr:only-child th {
        text-align: right;
    }

    .dataframe thead th {
        text-align: left;
    }

    .dataframe tbody tr th {
        vertical-align: top;
    }
</style>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>num_critic_for_reviews</th>
      <th>duration</th>
      <th>director_facebook_likes</th>
      <th>actor_3_facebook_likes</th>
      <th>actor_1_facebook_likes</th>
      <th>gross</th>
      <th>num_voted_users</th>
      <th>cast_total_facebook_likes</th>
      <th>facenumber_in_poster</th>
      <th>num_user_for_reviews</th>
      <th>budget</th>
      <th>actor_2_facebook_likes</th>
      <th>imdb_score</th>
      <th>aspect_ratio</th>
      <th>movie_facebook_likes</th>
      <th>net</th>
      <th>profitable</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>num_critic_for_reviews</th>
      <td>1.000000</td>
      <td>0.258486</td>
      <td>0.180674</td>
      <td>0.271646</td>
      <td>0.190016</td>
      <td>0.480601</td>
      <td>0.624943</td>
      <td>0.263203</td>
      <td>-0.033897</td>
      <td>0.609387</td>
      <td>0.119994</td>
      <td>0.282306</td>
      <td>0.305303</td>
      <td>-0.049786</td>
      <td>0.683176</td>
      <td>0.041345</td>
      <td>0.302878</td>
    </tr>
    <tr>
      <th>duration</th>
      <td>0.258486</td>
      <td>1.000000</td>
      <td>0.173296</td>
      <td>0.123558</td>
      <td>0.088449</td>
      <td>0.250298</td>
      <td>0.314765</td>
      <td>0.123074</td>
      <td>0.013469</td>
      <td>0.328403</td>
      <td>0.074276</td>
      <td>0.131673</td>
      <td>0.261662</td>
      <td>-0.090071</td>
      <td>0.196605</td>
      <td>0.009599</td>
      <td>0.097584</td>
    </tr>
    <tr>
      <th>director_facebook_likes</th>
      <td>0.180674</td>
      <td>0.173296</td>
      <td>1.000000</td>
      <td>0.120199</td>
      <td>0.090723</td>
      <td>0.144945</td>
      <td>0.297057</td>
      <td>0.119549</td>
      <td>-0.041268</td>
      <td>0.221890</td>
      <td>0.021090</td>
      <td>0.119601</td>
      <td>0.170802</td>
      <td>0.001642</td>
      <td>0.162048</td>
      <td>0.024960</td>
      <td>0.075534</td>
    </tr>
    <tr>
      <th>actor_3_facebook_likes</th>
      <td>0.271646</td>
      <td>0.123558</td>
      <td>0.120199</td>
      <td>1.000000</td>
      <td>0.249927</td>
      <td>0.308026</td>
      <td>0.287239</td>
      <td>0.473920</td>
      <td>0.099368</td>
      <td>0.230189</td>
      <td>0.047451</td>
      <td>0.559662</td>
      <td>0.052633</td>
      <td>-0.003366</td>
      <td>0.278844</td>
      <td>0.052960</td>
      <td>0.121738</td>
    </tr>
    <tr>
      <th>actor_1_facebook_likes</th>
      <td>0.190016</td>
      <td>0.088449</td>
      <td>0.090723</td>
      <td>0.249927</td>
      <td>1.000000</td>
      <td>0.154468</td>
      <td>0.192804</td>
      <td>0.951661</td>
      <td>0.072257</td>
      <td>0.145461</td>
      <td>0.022639</td>
      <td>0.390487</td>
      <td>0.076099</td>
      <td>-0.020049</td>
      <td>0.135348</td>
      <td>0.028688</td>
      <td>0.081260</td>
    </tr>
    <tr>
      <th>gross</th>
      <td>0.480601</td>
      <td>0.250298</td>
      <td>0.144945</td>
      <td>0.308026</td>
      <td>0.154468</td>
      <td>1.000000</td>
      <td>0.637271</td>
      <td>0.247400</td>
      <td>-0.027755</td>
      <td>0.559958</td>
      <td>0.102179</td>
      <td>0.262768</td>
      <td>0.198021</td>
      <td>0.069346</td>
      <td>0.378082</td>
      <td>0.208148</td>
      <td>0.434111</td>
    </tr>
    <tr>
      <th>num_voted_users</th>
      <td>0.624943</td>
      <td>0.314765</td>
      <td>0.297057</td>
      <td>0.287239</td>
      <td>0.192804</td>
      <td>0.637271</td>
      <td>1.000000</td>
      <td>0.265911</td>
      <td>-0.026998</td>
      <td>0.798406</td>
      <td>0.079621</td>
      <td>0.270790</td>
      <td>0.410965</td>
      <td>-0.014761</td>
      <td>0.537924</td>
      <td>0.127181</td>
      <td>0.361036</td>
    </tr>
    <tr>
      <th>cast_total_facebook_likes</th>
      <td>0.263203</td>
      <td>0.123074</td>
      <td>0.119549</td>
      <td>0.473920</td>
      <td>0.951661</td>
      <td>0.247400</td>
      <td>0.265911</td>
      <td>1.000000</td>
      <td>0.091475</td>
      <td>0.206923</td>
      <td>0.036557</td>
      <td>0.628404</td>
      <td>0.085787</td>
      <td>-0.017885</td>
      <td>0.209786</td>
      <td>0.044688</td>
      <td>0.116836</td>
    </tr>
    <tr>
      <th>facenumber_in_poster</th>
      <td>-0.033897</td>
      <td>0.013469</td>
      <td>-0.041268</td>
      <td>0.099368</td>
      <td>0.072257</td>
      <td>-0.027755</td>
      <td>-0.026998</td>
      <td>0.091475</td>
      <td>1.000000</td>
      <td>-0.069018</td>
      <td>-0.019559</td>
      <td>0.071228</td>
      <td>-0.062958</td>
      <td>0.013713</td>
      <td>0.008918</td>
      <td>0.012166</td>
      <td>0.006825</td>
    </tr>
    <tr>
      <th>num_user_for_reviews</th>
      <td>0.609387</td>
      <td>0.328403</td>
      <td>0.221890</td>
      <td>0.230189</td>
      <td>0.145461</td>
      <td>0.559958</td>
      <td>0.798406</td>
      <td>0.206923</td>
      <td>-0.069018</td>
      <td>1.000000</td>
      <td>0.084292</td>
      <td>0.219496</td>
      <td>0.292475</td>
      <td>-0.024719</td>
      <td>0.400594</td>
      <td>0.098387</td>
      <td>0.312737</td>
    </tr>
    <tr>
      <th>budget</th>
      <td>0.119994</td>
      <td>0.074276</td>
      <td>0.021090</td>
      <td>0.047451</td>
      <td>0.022639</td>
      <td>0.102179</td>
      <td>0.079621</td>
      <td>0.036557</td>
      <td>-0.019559</td>
      <td>0.084292</td>
      <td>1.000000</td>
      <td>0.044236</td>
      <td>0.030688</td>
      <td>0.006598</td>
      <td>0.062039</td>
      <td>-0.951709</td>
      <td>-0.013516</td>
    </tr>
    <tr>
      <th>actor_2_facebook_likes</th>
      <td>0.282306</td>
      <td>0.131673</td>
      <td>0.119601</td>
      <td>0.559662</td>
      <td>0.390487</td>
      <td>0.262768</td>
      <td>0.270790</td>
      <td>0.628404</td>
      <td>0.071228</td>
      <td>0.219496</td>
      <td>0.044236</td>
      <td>1.000000</td>
      <td>0.083808</td>
      <td>-0.007783</td>
      <td>0.243487</td>
      <td>0.042841</td>
      <td>0.117573</td>
    </tr>
    <tr>
      <th>imdb_score</th>
      <td>0.305303</td>
      <td>0.261662</td>
      <td>0.170802</td>
      <td>0.052633</td>
      <td>0.076099</td>
      <td>0.198021</td>
      <td>0.410965</td>
      <td>0.085787</td>
      <td>-0.062958</td>
      <td>0.292475</td>
      <td>0.030688</td>
      <td>0.083808</td>
      <td>1.000000</td>
      <td>0.059445</td>
      <td>0.247049</td>
      <td>0.036634</td>
      <td>0.151909</td>
    </tr>
    <tr>
      <th>aspect_ratio</th>
      <td>-0.049786</td>
      <td>-0.090071</td>
      <td>0.001642</td>
      <td>-0.003366</td>
      <td>-0.020049</td>
      <td>0.069346</td>
      <td>-0.014761</td>
      <td>-0.017885</td>
      <td>0.013713</td>
      <td>-0.024719</td>
      <td>0.006598</td>
      <td>-0.007783</td>
      <td>0.059445</td>
      <td>1.000000</td>
      <td>0.025737</td>
      <td>-0.005242</td>
      <td>-0.082229</td>
    </tr>
    <tr>
      <th>movie_facebook_likes</th>
      <td>0.683176</td>
      <td>0.196605</td>
      <td>0.162048</td>
      <td>0.278844</td>
      <td>0.135348</td>
      <td>0.378082</td>
      <td>0.537924</td>
      <td>0.209786</td>
      <td>0.008918</td>
      <td>0.400594</td>
      <td>0.062039</td>
      <td>0.243487</td>
      <td>0.247049</td>
      <td>0.025737</td>
      <td>1.000000</td>
      <td>0.062092</td>
      <td>0.196922</td>
    </tr>
    <tr>
      <th>net</th>
      <td>0.041345</td>
      <td>0.009599</td>
      <td>0.024960</td>
      <td>0.052960</td>
      <td>0.028688</td>
      <td>0.208148</td>
      <td>0.127181</td>
      <td>0.044688</td>
      <td>0.012166</td>
      <td>0.098387</td>
      <td>-0.951709</td>
      <td>0.042841</td>
      <td>0.036634</td>
      <td>-0.005242</td>
      <td>0.062092</td>
      <td>1.000000</td>
      <td>0.168376</td>
    </tr>
    <tr>
      <th>profitable</th>
      <td>0.302878</td>
      <td>0.097584</td>
      <td>0.075534</td>
      <td>0.121738</td>
      <td>0.081260</td>
      <td>0.434111</td>
      <td>0.361036</td>
      <td>0.116836</td>
      <td>0.006825</td>
      <td>0.312737</td>
      <td>-0.013516</td>
      <td>0.117573</td>
      <td>0.151909</td>
      <td>-0.082229</td>
      <td>0.196922</td>
      <td>0.168376</td>
      <td>1.000000</td>
    </tr>
  </tbody>
</table>
</div>
</div>

</div>

</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="o">!</span>jupyter nbconvert Exploritory.ipynb --template basic
</pre></div>

</div>
</div>
</div>

</div>
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span> 
</pre></div>

</div>
</div>
</div>

</div>
 

