{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "![Callysto.ca Banner](https://github.com/callysto/curriculum-notebooks/blob/master/callysto-notebook-banner-top.jpg?raw=true)\n", "\n", "\"Open" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Movie Theatre Release Numbers\n", "\n", "We can get data about theatrical release gross profits from [Box Office Mojo by IMDBPro](https://www.boxofficemojo.com)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
RankRelease GroupWorldwideDomestic%Foreign%.1
01Avengers: Endgame$2,797,800,564$858,373,00030.7%$1,939,427,56469.3%
12The Lion King$1,656,943,394$543,638,04332.8%$1,113,305,35167.2%
23Frozen II$1,450,026,933$477,373,57832.9%$972,653,35567.1%
34Spider-Man: Far from Home$1,131,927,996$390,532,08534.5%$741,395,91165.5%
45Captain Marvel$1,128,274,794$426,829,83937.8%$701,444,95562.2%
........................
769770The Hours and Times$1,273$1,273100%--
770771The Wolf Hour$1,255--$1,255100%
771772A Fish in the Bathtub 2019 re-release$1,237$1,237100%--
772773The Untold Story$790$790100%--
773774The Portal$685--$685100%
\n", "

774 rows × 7 columns

\n", "
" ], "text/plain": [ " Rank Release Group Worldwide \\\n", "0 1 Avengers: Endgame $2,797,800,564 \n", "1 2 The Lion King $1,656,943,394 \n", "2 3 Frozen II $1,450,026,933 \n", "3 4 Spider-Man: Far from Home $1,131,927,996 \n", "4 5 Captain Marvel $1,128,274,794 \n", ".. ... ... ... \n", "769 770 The Hours and Times $1,273 \n", "770 771 The Wolf Hour $1,255 \n", "771 772 A Fish in the Bathtub 2019 re-release $1,237 \n", "772 773 The Untold Story $790 \n", "773 774 The Portal $685 \n", "\n", " Domestic % Foreign %.1 \n", "0 $858,373,000 30.7% $1,939,427,564 69.3% \n", "1 $543,638,043 32.8% $1,113,305,351 67.2% \n", "2 $477,373,578 32.9% $972,653,355 67.1% \n", "3 $390,532,085 34.5% $741,395,911 65.5% \n", "4 $426,829,839 37.8% $701,444,955 62.2% \n", ".. ... ... ... ... \n", "769 $1,273 100% - - \n", "770 - - $1,255 100% \n", "771 $1,237 100% - - \n", "772 $790 100% - - \n", "773 - - $685 100% \n", "\n", "[774 rows x 7 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "year = 2019\n", "url = 'https://www.boxofficemojo.com/year/world/'+str(year)\n", "import pandas as pd\n", "box_office = pd.read_html(url)[0]\n", "box_office" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[![Callysto.ca License](https://github.com/callysto/curriculum-notebooks/blob/master/callysto-notebook-banner-bottom.jpg?raw=true)](https://github.com/callysto/curriculum-notebooks/blob/master/LICENSE.md)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 4 }