├── .gitignore ├── .rmotr ├── README.md ├── requirements.txt ├── travis.yml └── unit-1-reading-data-with-python-and-pandas ├── .rmotr ├── README.md ├── lesson-1-reading-csv-and-txt-files ├── .rmotr ├── README.md └── files │ ├── Lecture.ipynb │ ├── btc-market-price.csv │ └── exam_review.csv ├── lesson-10-artists-nested-biography ├── .rmotr ├── README.md ├── files │ └── artists.json ├── main.py ├── solutions │ └── solution_read_json.py └── tests │ ├── test_artists_1.py │ ├── test_artists_2.py │ ├── test_biography_1.py │ ├── test_biography_2.py │ └── test_biography_3.py ├── lesson-11-reading-data-from-relational-databases ├── .rmotr ├── README.md └── files │ ├── Lecture.ipynb │ └── chinook.db ├── lesson-12-vancouver-crime-information ├── .rmotr ├── README.md ├── files │ └── van_crime_2003.sql ├── main.py ├── solutions │ └── solution_van_crimes_sql.py └── tests │ ├── test_crimes_1.py │ ├── test_crimes_2.py │ ├── test_dangerous_month_1.py │ ├── test_dangerous_month_2.py │ ├── test_late_crimes_1.py │ └── test_late_crimes_2.py ├── lesson-13-querying-vancouver-crimes ├── .rmotr ├── README.md ├── files │ └── van_crime_2003.sql ├── main.py ├── solutions │ └── solution_van_crimes.py └── tests │ ├── test_crime_types_1.py │ ├── test_crime_types_2.py │ ├── test_crime_types_3.py │ ├── test_crimes_1.py │ └── test_crimes_2.py ├── lesson-14-crypto-currency-database ├── .rmotr ├── README.md ├── files │ └── cryptos.sql ├── main.py ├── solutions │ └── solution_cryptos.py └── tests │ ├── test_cryptos_1.py │ ├── test_cryptos_2.py │ ├── test_weekly_change_1.py │ └── test_weekly_change_2.py ├── lesson-15-fetching-data-from-a-rest-api ├── .rmotr ├── README.md └── files │ └── Lecture.ipynb ├── lesson-16-discover-starwars-people ├── .rmotr ├── README.md ├── main.py ├── solutions │ └── solution_swapi.py └── tests │ ├── test_blue_eyed_people_1.py │ ├── test_blue_eyed_people_2.py │ ├── test_starwars_people_1.py │ └── test_starwars_people_2.py ├── lesson-17-reading-html-tables ├── .rmotr ├── README.md └── files │ └── Lecture.ipynb ├── lesson-18-get-fifa-players-from-the-web ├── .rmotr ├── README.md ├── files │ └── fifa_players.html ├── main.py ├── solutions │ └── solution_fifa.py └── tests │ ├── test_fifa_1.py │ ├── test_fifa_2.py │ └── test_most_hits.py ├── lesson-19-complementary-file-types-and-io-tools ├── .rmotr ├── README.md └── files │ ├── Lecture.ipynb │ ├── airline.sas7bdat │ └── broiler.dta ├── lesson-2-load-movies-dataset ├── .rmotr ├── README.md ├── files │ └── movies.csv ├── main.py ├── solutions │ └── solution_read_csv.py └── tests │ ├── test_score.py │ └── test_shape.py ├── lesson-3-advanced-parsing-on-movies-dataset ├── .rmotr ├── README.md ├── files │ └── movies.csv ├── main.py ├── solutions │ └── solution_read_csv.py └── tests │ ├── test_budget.py │ ├── test_country.py │ └── test_shape.py ├── lesson-4-tsv-with-the-simpsons-episodes ├── .rmotr ├── README.md ├── files │ └── simpsons-episodes.tsv ├── main.py ├── solutions │ └── solution_1.py └── tests │ ├── test_simpsons_columns.py │ ├── test_simpsons_item.py │ └── test_simpsons_shape.py ├── lesson-5-reading-excel-files ├── .rmotr ├── README.md └── files │ ├── Lecture.ipynb │ └── products.xlsx ├── lesson-6-reading-playstore-apps-excel-file ├── .rmotr ├── README.md ├── files │ └── playstore.xlsx ├── main.py ├── solutions │ └── solution_read_xlsx.py └── tests │ ├── test_last_updated_datetime.py │ ├── test_top25_index.py │ └── test_top25_shape.py ├── lesson-7-load-playstore-apps-excel-file-with-multiple-sheets ├── .rmotr ├── README.md ├── files │ └── playstore.xlsx ├── main.py ├── solutions │ └── solution_read_xlsx.py └── tests │ ├── test_content_id_1.py │ ├── test_content_id_2.py │ ├── test_playstore_1.py │ └── test_playstore_2.py ├── lesson-8-reading-json-files ├── .rmotr ├── README.md └── files │ ├── Lecture.ipynb │ ├── games.json │ └── users.json └── lesson-9-parse-artists-json-file ├── .rmotr ├── README.md ├── files └── artists.json ├── main.py ├── solutions └── solution_read_json.py └── tests ├── test_artists.py ├── test_index.py └── test_shape.py /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /.rmotr: -------------------------------------------------------------------------------- 1 | uuid = "be4d616c-ed28-4601-a3e3-8b6c0ece5bfd" 2 | name = "Reading Data with Python and Pandas" 3 | track = "python" 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | #### We're in the process of adapting these notebooks into interactive projects in [DataWars](https://www.datawars.io/?utm_source=fccrepo&utm_medium=reading-data). Sign up now, it's [completely free](https://www.datawars.io/?utm_source=fccrepo&utm_medium=reading-data). 3 | 4 | Stay tuned! Have any questions? [Join our Discord](https://discord.gg/DSTe8tY38T) 5 | 6 | --- 7 | 8 | Created by Santiago Basulto. Connect with me on [X](https://x.com/santiagobasulto) or [LinkedIn](https://www.linkedin.com/in/santiagobasulto/) 9 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | requests==2.22.0 2 | 3 | pytest==4.6.5 4 | pytest-cache==1.0 5 | pytest-html==1.22.0 6 | pytest-json==0.4.0 7 | pytest-metadata==1.8.0 8 | pytest-pep8==1.0.6 9 | 10 | numpy==1.17.2 11 | pandas==0.25.1 12 | 13 | rmotr-curriculum-tools==0.2.0 -------------------------------------------------------------------------------- /travis.yml: -------------------------------------------------------------------------------- 1 | # Config file for automatic testing at travis-ci.org 2 | 3 | language: python 4 | 5 | python: 6 | - "3.6" 7 | - "3.7" 8 | 9 | # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors 10 | install: 11 | - pip install -r requirements.txt 12 | 13 | # command to run tests, e.g. python setup.py test 14 | script: 15 | - rmotr_curriculum_tools test -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/.rmotr: -------------------------------------------------------------------------------- 1 | uuid = "d3abb823-ec33-4109-aa6c-ced48f410a3f" 2 | name = "Reading Data with Python and Pandas" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/README.md: -------------------------------------------------------------------------------- 1 | # Reading Data with Python and Pandas 2 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-1-reading-csv-and-txt-files/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "af5ebcdb-7fa7-4a03-ba5f-a3c6388a497c" 3 | name = "Reading CSV and TXT files" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/reading-csv-and-txt-files-fb829f46" 5 | youtube_id = "" 6 | jwplayer_media_id = "WXCpuDD1" 7 | subscribed_only = false -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-1-reading-csv-and-txt-files/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-1-reading-csv-and-txt-files/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-1-reading-csv-and-txt-files/files/btc-market-price.csv: -------------------------------------------------------------------------------- 1 | 2/4/17 0:00,1099.169125 2 | 3/4/17 0:00,1141.813 3 | 4/4/17 0:00,? 4 | 5/4/17 0:00,1133.079314 5 | 6/4/17 0:00,- 6 | 7/4/17 0:00,- 7 | 8/4/17 0:00,1181.149838 8 | 9/4/17 0:00,1208.8005 9 | 10/4/17 0:00,1207.744875 10 | 11/4/17 0:00,1226.617038 11 | 12/4/17 0:00,1218.92205 12 | 13/4/17 0:00,1180.023713 13 | 14/4/17 0:00,1185.260057 14 | 15/4/17 0:00,1184.880671 15 | 16/4/17 0:00,1186.927413 16 | 17/4/17 0:00,? 17 | 18/4/17 0:00,1216.186743 18 | 19/4/17 0:00,1217.930088 19 | 20/4/17 0:00,1241.686325 20 | 21/4/17 0:00,1258.361413 21 | 22/4/17 0:00,1261.311225 22 | 23/4/17 0:00,1257.988113 23 | 24/4/17 0:00,1262.902775 24 | 25/4/17 0:00,1279.414688 25 | 26/4/17 0:00,1309.109875 26 | 27/4/17 0:00,1345.353913 27 | 28/4/17 0:00,1331.294429 28 | 29/4/17 0:00,1334.979038 29 | 30/4/17 0:00,? 30 | 1/5/17 0:00,1417.172813 31 | 2/5/17 0:00,1452.076288 32 | 3/5/17 0:00,1507.576857 33 | 4/5/17 0:00,1508.292125 34 | 5/5/17 0:00,1533.335071 35 | 6/5/17 0:00,1560.4102 36 | 7/5/17 0:00,1535.868429 37 | 8/5/17 0:00,1640.619225 38 | 9/5/17 0:00,1721.284971 39 | 10/5/17 0:00,1762.88625 40 | 11/5/17 0:00,1820.990563 41 | 12/5/17 0:00,1720.4785 42 | 13/5/17 0:00,1771.920013 43 | 14/5/17 0:00,1776.3165 44 | 15/5/17 0:00,1723.126938 45 | 16/5/17 0:00,1739.031975 46 | 17/5/17 0:00,1807.485063 47 | 18/5/17 0:00,1899.082888 48 | 19/5/17 0:00,1961.520488 49 | 20/5/17 0:00,2052.909788 50 | 21/5/17 0:00,2046.534463 51 | 22/5/17 0:00,2090.662313 52 | 23/5/17 0:00,2287.710288 53 | 24/5/17 0:00,2379.193833 54 | 25/5/17 0:00,2387.206286 55 | 26/5/17 0:00,2211.976857 56 | 27/5/17 0:00,2014.052963 57 | 28/5/17 0:00,2192.9808 58 | 29/5/17 0:00,2275.9307 59 | 30/5/17 0:00,2239.205343 60 | 31/5/17 0:00,2285.933914 61 | 1/6/17 0:00,2399.242671 62 | 2/6/17 0:00,2446.142414 63 | 3/6/17 0:00,2525.765158 64 | 4/6/17 0:00,2516.173143 65 | 5/6/17 0:00,2698.313813 66 | 6/6/17 0:00,2883.313697 67 | 7/6/17 0:00,2664.920863 68 | 8/6/17 0:00,2792.999188 69 | 9/6/17 0:00,2827.4913 70 | 10/6/17 0:00,2845.372857 71 | 11/6/17 0:00,2961.829612 72 | 12/6/17 0:00,2657.675063 73 | 13/6/17 0:00,2748.185086 74 | 14/6/17 0:00,2447.041563 75 | 15/6/17 0:00,2442.48025 76 | 16/6/17 0:00,2464.959814 77 | 17/6/17 0:00,2665.927 78 | 18/6/17 0:00,2507.389252 79 | 19/6/17 0:00,2617.210263 80 | 20/6/17 0:00,2754.97825 81 | 21/6/17 0:00,2671.04325 82 | 22/6/17 0:00,2727.288013 83 | 23/6/17 0:00,2710.412286 84 | 24/6/17 0:00,2589.164888 85 | 25/6/17 0:00,2512.366286 86 | 26/6/17 0:00,2436.451057 87 | 27/6/17 0:00,2517.903114 88 | 28/6/17 0:00,2585.349186 89 | 29/6/17 0:00,2544.414475 90 | 30/6/17 0:00,2477.641375 91 | 1/7/17 0:00,2434.077863 92 | 2/7/17 0:00,2501.191343 93 | 3/7/17 0:00,2561.225429 94 | 4/7/17 0:00,2599.729838 95 | 5/7/17 0:00,2619.187503 96 | 6/7/17 0:00,2609.96775 97 | 7/7/17 0:00,? 98 | 8/7/17 0:00,2562.130662 99 | 9/7/17 0:00,2536.238938 100 | 10/7/17 0:00,2366.170143 101 | 11/7/17 0:00,2369.862129 102 | 12/7/17 0:00,2385.748571 103 | 13/7/17 0:00,2354.783417 104 | 14/7/17 0:00,2190.947833 105 | 15/7/17 0:00,2058.9956 106 | 16/7/17 0:00,1931.2143 107 | 17/7/17 0:00,2176.623488 108 | 18/7/17 0:00,2320.12225 109 | 19/7/17 0:00,2264.7657 110 | 20/7/17 0:00,2898.188417 111 | 21/7/17 0:00,2682.195363 112 | 22/7/17 0:00,2807.609857 113 | 23/7/17 0:00,2725.549717 114 | 24/7/17 0:00,2751.821029 115 | 25/7/17 0:00,2560.997917 116 | 26/7/17 0:00,2495.028586 117 | 27/7/17 0:00,2647.625 118 | 28/7/17 0:00,2781.636583 119 | 29/7/17 0:00,2722.512786 120 | 30/7/17 0:00,2745.955417 121 | 31/7/17 0:00,2866.431667 122 | 1/8/17 0:00,2710.413067 123 | 2/8/17 0:00,2693.633983 124 | 3/8/17 0:00,2794.117717 125 | 4/8/17 0:00,2873.851083 126 | 5/8/17 0:00,3218.115017 127 | 6/8/17 0:00,3252.562533 128 | 7/8/17 0:00,3407.226833 129 | 8/8/17 0:00,3457.374333 130 | 9/8/17 0:00,3357.326317 131 | 10/8/17 0:00,3424.4042 132 | 11/8/17 0:00,3632.506667 133 | 12/8/17 0:00,3852.802914 134 | 13/8/17 0:00,4125.54802 135 | 14/8/17 0:00,4282.992 136 | 15/8/17 0:00,4217.028329 137 | 16/8/17 0:00,4360.876871 138 | 17/8/17 0:00,4328.725717 139 | 18/8/17 0:00,4130.440067 140 | 19/8/17 0:00,4222.662214 141 | 20/8/17 0:00,4157.958033 142 | 21/8/17 0:00,4043.722 143 | 22/8/17 0:00,4082.180983 144 | 23/8/17 0:00,4174.95 145 | 24/8/17 0:00,4340.316717 146 | 25/8/17 0:00,4363.05445 147 | 26/8/17 0:00,4360.513317 148 | 27/8/17 0:00,4354.308333 149 | 28/8/17 0:00,4391.673517 150 | 29/8/17 0:00,4607.98545 151 | 30/8/17 0:00,4594.98785 152 | 31/8/17 0:00,4748.255 153 | 1/9/17 0:00,4911.740017 154 | 2/9/17 0:00,4580.38748 155 | 3/9/17 0:00,4648.159983 156 | 4/9/17 0:00,4344.098317 157 | 5/9/17 0:00,4488.72014 158 | 6/9/17 0:00,4641.822017 159 | 7/9/17 0:00,4654.6585 160 | 8/9/17 0:00,4310.750183 161 | 9/9/17 0:00,4375.55952 162 | 10/9/17 0:00,4329.955 163 | 11/9/17 0:00,4248.090017 164 | 12/9/17 0:00,4219.036617 165 | 13/9/17 0:00,? 166 | 14/9/17 0:00,3319.63 167 | 15/9/17 0:00,3774.265283 168 | 16/9/17 0:00,3763.62604 169 | 17/9/17 0:00,3746.060783 170 | 18/9/17 0:00,4093.316667 171 | 19/9/17 0:00,3943.413333 172 | 20/9/17 0:00,3977.561667 173 | 21/9/17 0:00,3658.898183 174 | 22/9/17 0:00,3637.50255 175 | 23/9/17 0:00,3776.3869 176 | 24/9/17 0:00,3703.04065 177 | 25/9/17 0:00,3942.555 178 | 26/9/17 0:00,3910.307383 179 | 27/9/17 0:00,4202.554983 180 | 28/9/17 0:00,4201.98905 181 | 29/9/17 0:00,4193.574667 182 | 30/9/17 0:00,4335.368317 183 | 1/10/17 0:00,4360.722967 184 | 2/10/17 0:00,4386.88375 185 | 3/10/17 0:00,4293.3066 186 | 4/10/17 0:00,4225.175 187 | 5/10/17 0:00,4338.852 188 | 6/10/17 0:00,4345.603333 189 | 7/10/17 0:00,4376.191667 190 | 8/10/17 0:00,4602.280883 191 | 9/10/17 0:00,4777.967817 192 | 10/10/17 0:00,4782.28 193 | 11/10/17 0:00,4819.485767 194 | 12/10/17 0:00,5325.130683 195 | 13/10/17 0:00,5563.806567 196 | 14/10/17 0:00,5739.438733 197 | 15/10/17 0:00,5647.311667 198 | 16/10/17 0:00,5711.205867 199 | 17/10/17 0:00,5603.71294 200 | 18/10/17 0:00,5546.1761 201 | 19/10/17 0:00,5727.6335 202 | 20/10/17 0:00,5979.45984 203 | 21/10/17 0:00,6020.371683 204 | 22/10/17 0:00,5983.18455 205 | 23/10/17 0:00,5876.079867 206 | 24/10/17 0:00,5505.827767 207 | 25/10/17 0:00,5669.622533 208 | 26/10/17 0:00,5893.138417 209 | 27/10/17 0:00,5772.504983 210 | 28/10/17 0:00,5776.69695 211 | 29/10/17 0:00,6155.43402 212 | 30/10/17 0:00,6105.87422 213 | 31/10/17 0:00,6388.645167 214 | 1/11/17 0:00,6665.306683 215 | 2/11/17 0:00,7068.0201 216 | 3/11/17 0:00,7197.72006 217 | 4/11/17 0:00,7437.543317 218 | 5/11/17 0:00,7377.012367 219 | 6/11/17 0:00,6989.071667 220 | 7/11/17 0:00,7092.127233 221 | 8/11/17 0:00,7415.87825 222 | 9/11/17 0:00,7158.03706 223 | 10/11/17 0:00,6719.39785 224 | 11/11/17 0:00,- 225 | 12/11/17 0:00,5716.301583 226 | 13/11/17 0:00,6550.227533 227 | 14/11/17 0:00,6635.412633 228 | 15/11/17 0:00,7301.42992 229 | 16/11/17 0:00,7815.0307 230 | 17/11/17 0:00,7786.884367 231 | 18/11/17 0:00,7817.140383 232 | 19/11/17 0:00,8007.654067 233 | 20/11/17 0:00,8255.596817 234 | 21/11/17 0:00,8059.8 235 | 22/11/17 0:00,8268.035 236 | 23/11/17 0:00,8148.95 237 | 24/11/17 0:00,8250.978333 238 | 25/11/17 0:00,8707.407267 239 | 26/11/17 0:00,9284.1438 240 | 27/11/17 0:00,9718.29505 241 | 28/11/17 0:00,9952.50882 242 | 29/11/17 0:00,9879.328333 243 | 30/11/17 0:00,10147.372 244 | 1/12/17 0:00,10883.912 245 | 2/12/17 0:00,11071.36833 246 | 3/12/17 0:00,11332.622 247 | 4/12/17 0:00,11584.83 248 | 5/12/17 0:00,11878.43333 249 | 6/12/17 0:00,13540.98 250 | 7/12/17 0:00,16501.97167 251 | 8/12/17 0:00,16007.43667 252 | 9/12/17 0:00,15142.83415 253 | 10/12/17 0:00,14869.805 254 | 11/12/17 0:00,16762.11667 255 | 12/12/17 0:00,17276.39333 256 | 13/12/17 0:00,16808.36667 257 | 14/12/17 0:00,16678.892 258 | 15/12/17 0:00,17771.9 259 | 16/12/17 0:00,19498.68333 260 | 17/12/17 0:00,19289.785 261 | 18/12/17 0:00,18961.85667 262 | 19/12/17 0:00,17737.11167 263 | 20/12/17 0:00,16026.27167 264 | 21/12/17 0:00,16047.51 265 | 22/12/17 0:00,15190.945 266 | 23/12/17 0:00,15360.26167 267 | 24/12/17 0:00,13949.175 268 | 25/12/17 0:00,14119.02833 269 | 26/12/17 0:00,15999.04833 270 | 27/12/17 0:00,- 271 | 28/12/17 0:00,14380.58167 272 | 29/12/17 0:00,14640.14 273 | 30/12/17 0:00,13215.574 274 | 31/12/17 0:00,14165.575 275 | 1/1/18 0:00,13812.18667 276 | 2/1/18 0:00,15005.85667 277 | 3/1/18 0:00,15053.26167 278 | 4/1/18 0:00,15199.355 279 | 5/1/18 0:00,17174.12 280 | 6/1/18 0:00,17319.198 281 | 7/1/18 0:00,16651.47167 282 | 8/1/18 0:00,15265.90667 283 | 9/1/18 0:00,14714.25333 284 | 10/1/18 0:00,15126.39833 285 | 11/1/18 0:00,13296.794 286 | 12/1/18 0:00,13912.882 287 | 13/1/18 0:00,14499.77333 288 | 14/1/18 0:00,13852.92 289 | 15/1/18 0:00,14012.196 290 | 16/1/18 0:00,11180.99833 291 | 17/1/18 0:00,11116.94667 292 | 18/1/18 0:00,11345.42333 293 | 19/1/18 0:00,11422.44 294 | 20/1/18 0:00,12950.79333 295 | 21/1/18 0:00,11505.228 296 | 22/1/18 0:00,10544.59333 297 | 23/1/18 0:00,11223.064 298 | 24/1/18 0:00,11282.25833 299 | 25/1/18 0:00,11214.44 300 | 26/1/18 0:00,10969.815 301 | 27/1/18 0:00,11524.77667 302 | 28/1/18 0:00,11765.71 303 | 29/1/18 0:00,11212.655 304 | 30/1/18 0:00,10184.06167 305 | 31/1/18 0:00,10125.01333 306 | 1/2/18 0:00,9083.258333 307 | 2/2/18 0:00,8901.901667 308 | 3/2/18 0:00,9076.678333 309 | 4/2/18 0:00,8400.648333 310 | 5/2/18 0:00,6838.816667 311 | 6/2/18 0:00,7685.633333 312 | 7/2/18 0:00,8099.958333 313 | 8/2/18 0:00,8240.536667 314 | 9/2/18 0:00,8535.516667 315 | 10/2/18 0:00,8319.876566 316 | 11/2/18 0:00,8343.455 317 | 12/2/18 0:00,8811.343333 318 | 13/2/18 0:00,8597.7675 319 | 14/2/18 0:00,9334.633333 320 | 15/2/18 0:00,9977.154 321 | 16/2/18 0:00,10127.16167 322 | 17/2/18 0:00,10841.99167 323 | 18/2/18 0:00,- 324 | 19/2/18 0:00,11110.965 325 | 20/2/18 0:00,11390.39167 326 | 21/2/18 0:00,10532.79167 327 | 22/2/18 0:00,9931.071667 328 | 23/2/18 0:00,10162.11667 329 | 24/2/18 0:00,9697.956 330 | 25/2/18 0:00,9696.593333 331 | 26/2/18 0:00,10348.60333 332 | 27/2/18 0:00,10763.88333 333 | 28/2/18 0:00,10370.165 334 | 1/3/18 0:00,11009.38167 335 | 2/3/18 0:00,11055.815 336 | 3/3/18 0:00,11326.94833 337 | 4/3/18 0:00,11430.18167 338 | 5/3/18 0:00,11595.54 339 | 6/3/18 0:00,10763.19833 340 | 7/3/18 0:00,10118.058 341 | 8/3/18 0:00,9429.111667 342 | 9/3/18 0:00,9089.278333 343 | 10/3/18 0:00,8746.002 344 | 11/3/18 0:00,9761.396667 345 | 12/3/18 0:00,9182.843333 346 | 13/3/18 0:00,9154.7 347 | 14/3/18 0:00,8151.531667 348 | 15/3/18 0:00,8358.121667 349 | 16/3/18 0:00,8530.402 350 | 17/3/18 0:00,7993.674644 351 | 18/3/18 0:00,8171.415 352 | 19/3/18 0:00,- 353 | 20/3/18 0:00,8986.948333 354 | 21/3/18 0:00,8947.753333 355 | 22/3/18 0:00,8690.408333 356 | 23/3/18 0:00,8686.826667 357 | 24/3/18 0:00,8662.378333 358 | 25/3/18 0:00,8617.296667 359 | 26/3/18 0:00,8197.548333 360 | 27/3/18 0:00,7876.195 361 | 28/3/18 0:00,7960.38 362 | 29/3/18 0:00,7172.28 363 | 30/3/18 0:00,6882.531667 364 | 31/3/18 0:00,6935.48 365 | 1/4/18 0:00,6794.105 -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-1-reading-csv-and-txt-files/files/exam_review.csv: -------------------------------------------------------------------------------- 1 | first_name>last_name>age>math_score>french_score 2 | Ray>Morley>18>"68,000">"75,000" 3 | Melvin>Scott>24>77>83 4 | Amirah>Haley>22>92>67 5 | 6 | Gerard>Mills>19>"78,000">72 7 | Amy>Grimes>23>91>81 8 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/.rmotr: -------------------------------------------------------------------------------- 1 | uuid = "f7cee760-1859-4c55-8b41-af07849fe8fe" 2 | name = "Artists nested biography" 3 | type = "assignment" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/README.md: -------------------------------------------------------------------------------- 1 | # Artists nested biography 2 | 3 | This exercise will take a few steps to complete successfully. Have a look at the `artists.json` file before starting so you have an idea of the structure and information contained. 4 | 5 | - Read the `artists.json` into an `artists` DataFrame variable, using `json_normalize`. Keep the default index. 6 | - Using the `bio` column, create a new `biography` DataFrame variable with the bio of each artist. 7 | - When creatng the `biography` DataFrame also add the `name` column. 8 | 9 | > This JSON was originally a CSV file from Kaggle and has been altered for this course, https://www.kaggle.com/ikarus777/best-artworks-of-all-time 10 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/files/artists.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Amedeo Modigliani", 4 | "years": "1884 - 1920", 5 | "genre": "Expressionism", 6 | "nationality": "Italian", 7 | "bio": [ 8 | { 9 | "full name": "Amedeo Clemente Modigliani", 10 | "pronunciation": "[ame\u02c8d\u025b\u02d0o modi\u028e\u02c8\u028ea\u02d0ni]", 11 | "life span": "12 July 1884 \u2013 24 January 1920", 12 | "info": "was an Italian Jewish painter and sculptor who worked mainly in France. He is known for portraits and nudes in a modern style characterized by elongation of faces, necks, and figures that were not received well during his lifetime but later found acceptance. Modigliani spent his youth in Italy, where he studied the art of antiquity and the Renaissance. In 1906 he moved to Paris, where he came into contact with such artists as Pablo Picasso and Constantin Br\u00e2ncu\u0219i. By 1912 Modigliani was exhibiting highly stylized sculptures with Cubists of the Section d'Or group at the Salon d'Automne.", 13 | "wikipedia": "http://en.wikipedia.org/wiki/Amedeo_Modigliani", 14 | "paintings": 193 15 | } 16 | ] 17 | }, 18 | { 19 | "name": "Vasiliy Kandinskiy", 20 | "years": "1866 - 1944", 21 | "genre": "Expressionism,Abstractionism", 22 | "nationality": "Russian", 23 | "bio": [ 24 | { 25 | "full name": "Wassily Wassilyevich Kandinsky", 26 | "pronunciation": "\u0412\u0430\u0441\u0438\u0301\u043b\u0438\u0439 \u0412\u0430\u0441\u0438\u0301\u043b\u044c\u0435\u0432\u0438\u0447 \u041a\u0430\u043d\u0434\u0438\u0301\u043d\u0441\u043a\u0438\u0439, tr. Vas\u00edliy Vas\u00edl\u02b9evich Kand\u00ednskiy", 27 | "life span": "16 December [O.S. 4 December] 1866 \u2013 13 December 1944", 28 | "info": "was a Russian painter and art theorist.", 29 | "wikipedia": "http://en.wikipedia.org/wiki/Wassily_Kandinsky", 30 | "paintings": 88 31 | } 32 | ] 33 | }, 34 | { 35 | "name": "Diego Rivera", 36 | "years": "1886 - 1957", 37 | "genre": "Social Realism,Muralism", 38 | "nationality": "Mexican", 39 | "bio": [ 40 | { 41 | "full name": "Diego Mar\u00eda de la Concepci\u00f3n Juan Nepomuceno Estanislao de la Rivera y Barrientos Acosta y Rodr\u00edguez, known as Diego Rivera", 42 | "pronunciation": "[\u02c8dje\u0263o ri\u02c8\u03b2e\u027ea]", 43 | "life span": "December 8, 1886 \u2013 November 24, 1957", 44 | "info": "was a prominent Mexican painter. His large frescoes helped establish the Mexican mural movement in Mexican art. Between 1922 and 1953, Rivera painted murals in, among other places, Mexico City, Chapingo, Cuernavaca, San Francisco, Detroit, and New York City. In 1931, a retrospective exhibition of his works was held at the Museum of Modern Art in New York. Rivera had a volatile marriage with fellow Mexican artist Frida Kahlo.", 45 | "wikipedia": "http://en.wikipedia.org/wiki/Diego_Rivera", 46 | "paintings": 70 47 | } 48 | ] 49 | }, 50 | { 51 | "name": "Claude Monet", 52 | "years": "1840 - 1926", 53 | "genre": "Impressionism", 54 | "nationality": "French", 55 | "bio": [ 56 | { 57 | "full name": "Oscar-Claude Monet", 58 | "pronunciation": "[klod m\u0254n\u025b]", 59 | "life span": "14 November 1840 \u2013 5 December 1926", 60 | "info": "was a French painter, a founder of French Impressionist painting and the most consistent and prolific practitioner of the movement's philosophy of expressing one's perceptions before nature, especially as applied to plein air landscape painting. The term 'Impressionism' is derived from the title of his painting Impression, soleil levant (Impression, Sunrise), which was exhibited in 1874 in the first of the independent exhibitions mounted by Monet and his associates as an alternative to the Salon de Paris.Monet's ambition of documenting the French countryside led him to adopt a method of painting the same scene many times in order to capture the changing of light and the passing of the seasons. From 1883, Monet lived in Giverny, where he purchased a house and property and began a vast landscaping project which included lily ponds that would become the subjects of his best-known works. In 1899, he began painting the water lilies, first in vertical views with a Japanese bridge as a central feature and later in the series of large-scale paintings that was to occupy him continuously for the next 20 years of his life.", 61 | "wikipedia": "http://en.wikipedia.org/wiki/Claude_Monet", 62 | "paintings": 73 63 | } 64 | ] 65 | }, 66 | { 67 | "name": "Rene Magritte", 68 | "years": "1898 - 1967", 69 | "genre": "Surrealism,Impressionism", 70 | "nationality": "Belgian", 71 | "bio": [ 72 | { 73 | "full name": "Ren\u00e9 Fran\u00e7ois Ghislain Magritte", 74 | "pronunciation": "[\u0281\u0259ne f\u0281\u0251\u0303swa \u0261il\u025b\u0303 ma\u0261\u0281it]", 75 | "life span": "21 November 1898 \u2013 15 August 1967", 76 | "info": "Was a Belgian Surrealist artist. He became well known for creating a number of witty and thought-provoking images. Often depicting ordinary objects in an unusual context, his work is known for challenging observers' preconditioned perceptions of reality. His imagery has influenced Pop art, minimalist and conceptual art.", 77 | "wikipedia": "http://en.wikipedia.org/wiki/Ren\u00e9_Magritte", 78 | "paintings": 194 79 | } 80 | ] 81 | } 82 | ] 83 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import json 4 | from pandas.io.json import json_normalize 5 | 6 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/solutions/solution_read_json.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import json 4 | from pandas.io.json import json_normalize 5 | 6 | with open('artists.json') as file: 7 | json_dict = json.load(file) 8 | 9 | artists = json_normalize(json_dict) 10 | 11 | biography = json_normalize(json_dict, 12 | record_path='bio', 13 | meta=['name']) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/tests/test_artists_1.py: -------------------------------------------------------------------------------- 1 | def test_artists_1(): 2 | assert artists.shape == (5,5) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/tests/test_artists_2.py: -------------------------------------------------------------------------------- 1 | def test_artists_2(): 2 | assert artists.iloc[2]['name'] == 'Diego Rivera' -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/tests/test_biography_1.py: -------------------------------------------------------------------------------- 1 | def test_biography_1(): 2 | assert biography.shape == (5,7) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/tests/test_biography_2.py: -------------------------------------------------------------------------------- 1 | def test_biography_2(): 2 | assert biography.iloc[4]['paintings'] == 194 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-10-artists-nested-biography/tests/test_biography_3.py: -------------------------------------------------------------------------------- 1 | def test_biography_3(): 2 | assert biography.iloc[3]['name'] == 'Claude Monet' 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-11-reading-data-from-relational-databases/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "cd511da7-0308-440e-ad92-395a713cbb4f" 3 | name = "Reading data from relational databases" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/reading-data-from-relational-databases-2a3a889b" 5 | youtube_id = "" 6 | jwplayer_media_id = "CExdEODJ" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-11-reading-data-from-relational-databases/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-11-reading-data-from-relational-databases/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-11-reading-data-from-relational-databases/files/chinook.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-11-reading-data-from-relational-databases/files/chinook.db -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "66979d1f-01f8-429d-9311-8ee32e033db4" 3 | name = "Vancouver crime information" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/README.md: -------------------------------------------------------------------------------- 1 | # Vancouver crime information 2 | 3 | Using the given sqlite3 connection: 4 | - Store all the crimes committed after 18:00 h in a `late_crimes` variable. 5 | - Store the number of crimes committed on the month with most crimes in a `dangerous_month_crimes` variable. 6 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/files/van_crime_2003.sql: -------------------------------------------------------------------------------- 1 | PRAGMA foreign_keys=OFF; 2 | BEGIN TRANSACTION; 3 | CREATE TABLE IF NOT EXISTS "van_crimes" ( 4 | "TYPE" TEXT, 5 | "YEAR" INTEGER, 6 | "MONTH" INTEGER, 7 | "DAY" REAL, 8 | "HOUR" REAL, 9 | "MINUTE" REAL, 10 | "HUNDRED_BLOCK" TEXT, 11 | "NEIGHBOURHOOD" TEXT, 12 | "X" REAL, 13 | "Y" REAL 14 | ); 15 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,27.999999999999999999,12.999999999999999999,30.0,'8XX EXPO BLVD','Central Business District',491771.63000000000464,5458295.0099999997762); 16 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,17.0,16.0,0.0,'56XX OAK ST','South Cambie',490682.32000000000696,5453536.9599999999625); 17 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,30.0,13.999999999999999999,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 18 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,15.0,13.999999999999999999,45.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 19 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,27.999999999999999999,16.0,45.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 20 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,12.0,15.0,30.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 21 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,12.0,12.999999999999999999,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 22 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,19.0,13.999999999999999999,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 23 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,1.0,10.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 24 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,5.0,16.0,30.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 25 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,25.0,12.999999999999999999,15.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 26 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,2.0,12.999999999999999999,15.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 27 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,2.0,20.999999999999999999,0.0,'20XX E 28TH AVE','Kensington-Cedar Cottage',495267.03000000002795,5454779.0499999998137); 28 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,27.0,22.0,30.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 29 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,17.0,20.999999999999999999,0.0,'31XX WILLOW ST','Fairview',491115.71999999997207,5456039.9599999999625); 30 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,3.0,0.0,1.0,'20XX E 28TH AVE','Kensington-Cedar Cottage',495267.03000000002795,5454779.0499999998137); 31 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,25.999999999999999999,0.0,1.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 32 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,24.0,11.0,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 33 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,1.0,20.0,10.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 34 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,17.0,19.0,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 35 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,17.0,17.0,0.0,'20XX E 26TH AVE','Kensington-Cedar Cottage',495270.76000000000931,5454981.3499999996275); 36 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,3,10.0,12.0,0.0,'10XX E GEORGIA ST','Strathcona',494050.84000000002559,5458395.8499999996275); 37 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,12.0,16.0,45.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 38 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,1.0,16.0,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 39 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,7,24.0,16.0,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 40 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,7,20.999999999999999999,12.0,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 41 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,16.0,6.0,0.0,'20XX E 23RD AVE','Kensington-Cedar Cottage',495274.53000000002795,5455176.8899999996645); 42 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,27.0,0.0,30.0,'20XX E 20TH AVE','Kensington-Cedar Cottage',495380.84000000002561,5455513.5999999996273); 43 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,7,10.0,17.999999999999999999,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 44 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,8.0,22.999999999999999999,30.0,'20XX E 20TH AVE','Kensington-Cedar Cottage',495323.78999999997905,5455541.9299999997019); 45 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,30.0,11.0,30.0,'20XX E 1ST AVE','Grandview-Woodland',495436.55999999999767,5457427.3799999998882); 46 | INSERT INTO van_crimes VALUES('Mischief',2003,10,9.0,20.999999999999999999,30.0,'9XX BEATTY ST','Central Business District',491591.16999999998369,5458195.6699999999256); 47 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,3.0,16.0,10.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 48 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,3,16.0,17.999999999999999999,0.0,'31XX YEW ST','Kitsilano',488689.26000000000929,5456170.6399999996648); 49 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,20.999999999999999999,19.0,0.0,'56XX OAK ST','South Cambie',490682.32000000000696,5453536.9599999999625); 50 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,5,13.999999999999999999,8.0,45.0,'10XX E PENDER ST','Strathcona',494055.63000000000464,5458588.0599999995902); 51 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,7,2.0,13.999999999999999999,30.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 52 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,3.0,16.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 53 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,16.0,12.999999999999999999,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 54 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,12.999999999999999999,20.999999999999999999,45.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 55 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,22.0,12.999999999999999999,15.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 56 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,30.0,20.999999999999999999,0.0,'20XX E 13TH AVE','Kensington-Cedar Cottage',495346.78999999997902,5456204.4500000001861); 57 | INSERT INTO van_crimes VALUES('Offence Against a Person',2003,7,15.0,NULL,NULL,'OFFSET TO PROTECT PRIVACY',NULL,0.0,0.0); 58 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,17.999999999999999999,20.999999999999999999,0.0,'20XX E 13TH AVE','Kensington-Cedar Cottage',495346.78999999997902,5456204.4500000001861); 59 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,5.0,22.0,0.0,'20XX E 13TH AVE','Kensington-Cedar Cottage',495346.78999999997902,5456204.4500000001861); 60 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,4.0,12.0,0.0,'20XX E 12TH AVE','Kensington-Cedar Cottage',495362.00000000000002,5456304.1200000001115); 61 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,10.0,9.0,20.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 62 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,1,6.0,22.0,0.0,'32XX ADANAC ST','Hastings-Sunrise',497373.96000000002097,5458296.4500000001862); 63 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,22.0,9.0,0.0,'32XX ADANAC ST','Hastings-Sunrise',497412.60999999998603,5458305.2499999999999); 64 | INSERT INTO van_crimes VALUES('Offence Against a Person',2003,5,13.999999999999999999,NULL,NULL,'OFFSET TO PROTECT PRIVACY',NULL,0.0,0.0); 65 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,11.0,2.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 66 | INSERT INTO van_crimes VALUES('Mischief',2003,5,1.0,17.999999999999999999,0.0,'9XX BROUGHTON ST','West End',490329.60999999998601,5459238.6900000004095); 67 | INSERT INTO van_crimes VALUES('Mischief',2003,6,27.999999999999999999,0.0,0.0,'9XX BROUGHTON ST','West End',490329.60999999998601,5459238.6900000004095); 68 | INSERT INTO van_crimes VALUES('Mischief',2003,10,17.999999999999999999,5.0,0.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 69 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,2,27.999999999999999999,15.0,0.0,'85XX STANLEY PARK DR','Stanley Park',489104.19000000000234,5460347.3600000003353); 70 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,27.0,15.0,30.999999999999999999,'20XX E 10TH AVE','Kensington-Cedar Cottage',495371.39000000001394,5456502.9599999999628); 71 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,20.0,7.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 72 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,17.999999999999999999,17.0,0.0,'85XX SHAUGHNESSY ST','Marpole',490620.7600000000093,5450708.3300000000744); 73 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,4.0,16.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 74 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,25.0,12.999999999999999999,30.0,'20XX DUNBAR ST','Kitsilano',486645.14000000001396,5457325.0800000000742); 75 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,2,6.0,12.999999999999999999,0.0,'30XX HEATHER ST','Fairview',491266.04999999998837,5456133.2599999997766); 76 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,9,1.0,12.999999999999999999,0.0,'10XX EXPO BLVD','Central Business District',491544.52000000001862,5458009.7400000002236); 77 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,9,1.0,13.999999999999999999,0.0,'10XX EXPO BLVD','Central Business District',491544.52000000001862,5458009.7400000002236); 78 | INSERT INTO van_crimes VALUES('Mischief',2003,10,4.0,9.0,0.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 79 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,22.0,11.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 80 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,2.0,12.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 81 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,20.999999999999999999,10.0,0.0,'20XX COMOX ST','West End',489621.15999999997438,5459767.8399999998509); 82 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,29.0,20.999999999999999999,0.0,'20XX COMOX ST','West End',489621.15999999997438,5459767.8399999998509); 83 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,12.0,17.999999999999999999,30.0,'20XX COMOX ST','West End',489621.15999999997438,5459767.8399999998509); 84 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,9.0,10.0,10.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 85 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,1.0,19.0,0.0,'56XX OAK ST','South Cambie',490682.32000000000696,5453536.9599999999625); 86 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,10.0,15.0,40.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 87 | INSERT INTO van_crimes VALUES('Mischief',2003,9,22.0,11.0,0.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 88 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,4,12.0,7.0,0.0,'10XX GILFORD ST','West End',489763.20000000001164,5459711.6699999999256); 89 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,12.0,13.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 90 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,2.0,22.0,0.0,'20XX COMOX ST','West End',489602.48999999999067,5459799.9999999999999); 91 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,12.0,20.0,0.0,'20XX COMOX ST','West End',489602.48999999999067,5459799.9999999999999); 92 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,12.999999999999999999,15.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 93 | INSERT INTO van_crimes VALUES('Mischief',2003,3,27.0,16.0,30.0,'9XX BURRARD ST','West End',490887.1500000000233,5458782.3099999995902); 94 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,16.0,13.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 95 | INSERT INTO van_crimes VALUES('Mischief',2003,8,10.0,2.0,22.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 96 | INSERT INTO van_crimes VALUES('Offence Against a Person',2003,8,3.0,NULL,NULL,'OFFSET TO PROTECT PRIVACY',NULL,0.0,0.0); 97 | INSERT INTO van_crimes VALUES('Mischief',2003,7,27.0,17.999999999999999999,30.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 98 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,9.0,15.0,35.999999999999999999,'20XX COMMERCIAL DR','Grandview-Woodland',494933.79999999998837,5457123.4199999999253); 99 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,13.999999999999999999,22.999999999999999999,0.0,'20XX COMMERCIAL DR','Grandview-Woodland',494933.69000000000234,5457116.7900000000371); 100 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,17.0,11.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 101 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,17.999999999999999999,12.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 102 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,30.999999999999999999,22.999999999999999999,30.0,'20XX COLUMBIA ST','Mount Pleasant',492042.40000000002328,5457188.5700000002982); 103 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,7.0,17.0,0.0,'11XX BARCLAY ST','West End',490719.7600000000093,5458990.7300000004471); 104 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,16.0,22.0,30.0,'20XX CHARLES ST','Grandview-Woodland',495362.95000000001164,5457801.3300000000744); 105 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,20.999999999999999999,0.0,0.0,'20XX CHARLES ST','Grandview-Woodland',495362.95000000001164,5457801.3300000000744); 106 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,11.0,17.999999999999999999,30.0,'11XX BARCLAY ST','West End',490719.7600000000093,5458990.7300000004471); 107 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,27.0,20.0,0.0,'11XX BARCLAY ST','West End',490719.7600000000093,5458990.7300000004471); 108 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,2.0,12.999999999999999999,0.0,'11XX BARCLAY ST','West End',490719.7600000000093,5458990.7300000004471); 109 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,15.0,8.0,9.0,'11XX BARCLAY ST','West End',490719.7600000000093,5458990.7300000004471); 110 | INSERT INTO van_crimes VALUES('Mischief',2003,7,17.999999999999999999,8.0,0.0,'5XX E 41ST AVE','Sunset',493176.45000000001165,5453348.1100000003351); 111 | INSERT INTO van_crimes VALUES('Mischief',2003,4,29.0,19.0,30.0,'5XX E 41ST AVE','Sunset',493176.45000000001165,5453348.1100000003351); 112 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,17.0,19.0,0.0,'85XX SELKIRK ST','Marpole',490308.10999999998602,5450671.7499999999998); 113 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,3,4.0,13.999999999999999999,0.0,'5X STANLEY PARK CSWY "STANLEY PARK"','Stanley Park',490067.49999999999999,5460237.6500000003724); 114 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,3,17.0,17.0,0.0,'5X STANLEY PARK CSWY "STANLEY PARK"','Stanley Park',490067.49999999999999,5460237.6500000003724); 115 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,4,22.0,10.0,49.0,'5X STANLEY PARK CSWY "STANLEY PARK"','Stanley Park',490067.49999999999999,5460237.6500000003724); 116 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,4,24.0,13.999999999999999999,0.0,'5X STANLEY PARK CSWY "STANLEY PARK"','Stanley Park',490067.49999999999999,5460237.6500000003724); 117 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,27.999999999999999999,22.0,30.0,'85XX OSLER ST','Marpole',490420.20000000001163,5450728.8099999995903); 118 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,17.999999999999999999,13.999999999999999999,35.999999999999999999,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 119 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,4,17.999999999999999999,0.0,0.0,'56XX OAK ST','South Cambie',490682.32000000000696,5453536.9599999999625); 120 | INSERT INTO van_crimes VALUES('Vehicle Collision or Pedestrian Struck (with Injury)',2003,12,24.0,19.0,0.0,'E 12TH AVE / VICTORIA DR','Kensington-Cedar Cottage',495200.99999999999998,5456309.9999999999998); 121 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,19.0,17.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 122 | INSERT INTO van_crimes VALUES('Mischief',2003,8,16.0,19.0,50.0,'5XX E 41ST AV','Sunset',493247.08000000001629,5453341.1500000003725); 123 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,4,10.0,17.0,0.0,'56XX OAK ST','South Cambie',490682.32000000000696,5453536.9599999999625); 124 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,20.0,20.0,30.0,'85XX LIGHTHOUSE WAY','Killarney',496436.4400000000023,5450343.6500000003723); 125 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,6.0,7.0,0.0,'4XX SEMLIN DR','Grandview-Woodland',495376.35999999998603,5458711.7599999997762); 126 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,19.0,20.0,0.0,'85XX LIGHTHOUSE WAY','Killarney',496436.21000000002093,5450361.0); 127 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,9.0,15.0,0.0,'48XX CAMBIE ST','Riley Park',491398.10999999998602,5454383.4299999997021); 128 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,2,1.0,12.999999999999999999,30.0,'5X UNION ST','Central Business District',492494.26000000000929,5458318.4500000001861); 129 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,4,27.0,11.0,0.0,'5X UNION ST','Central Business District',492495.38000000000464,5458327.5300000002605); 130 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,4.0,1.0,55.0,'5X UNION ST','Central Business District',492495.38000000000464,5458327.5300000002605); 131 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,2.0,17.0,15.0,'5X UNION ST','Central Business District',492495.38000000000464,5458327.5300000002605); 132 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,27.0,16.0,45.0,'5X UNION ST','Central Business District',492495.38000000000464,5458327.5300000002605); 133 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,4,12.999999999999999999,9.0,0.0,'10XX GRANVILLE ST','Central Business District',491000.32000000000697,5458448.6500000003726); 134 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,3.0,0.0,0.0,'10XX GRANVILLE ST','Central Business District',491000.32000000000697,5458448.6500000003726); 135 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,13.999999999999999999,22.0,0.0,'10XX GRANVILLE ST','Central Business District',491000.32000000000697,5458448.6500000003726); 136 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,17.0,15.0,30.0,'5X UNION ST','Central Business District',492503.22999999998135,5458326.5099999997765); 137 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,9,17.0,22.999999999999999999,11.0,'10XX GRANVILLE ST','Central Business District',491000.32000000000697,5458448.6500000003726); 138 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,4,10.0,12.0,0.0,'5X W 10TH AV','Mount Pleasant',492294.10999999998603,5456601.6100000003354); 139 | INSERT INTO van_crimes VALUES('Vehicle Collision or Pedestrian Struck (with Injury)',2003,1,30.0,17.0,30.0,'E 12TH AVE / ST CATHERINES ST','Mount Pleasant',493791.00000000000002,5456329.9999999999999); 140 | INSERT INTO van_crimes VALUES('Mischief',2003,4,29.0,20.0,30.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 141 | INSERT INTO van_crimes VALUES('Vehicle Collision or Pedestrian Struck (with Injury)',2003,1,12.0,22.999999999999999999,45.0,'E 12TH AVE / ST CATHERINES ST','Mount Pleasant',493791.00000000000002,5456329.9999999999999); 142 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,24.0,15.0,0.0,'20XX BEACH AVE','West End',489365.99999999999999,5459777.6900000004099); 143 | INSERT INTO van_crimes VALUES('Mischief',2003,4,12.999999999999999999,3.0,0.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 144 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,4.0,20.0,10.0,'30XX KINGSWAY AVE','Renfrew-Collingwood',496941.90000000002327,5453677.3600000003352); 145 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,30.0,20.999999999999999999,0.0,'20XX BAYSWATER ST','Kitsilano',487559.08000000001628,5457304.4900000002234); 146 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,8.0,22.0,55.0,'30XX KINGSWAY AVE','Renfrew-Collingwood',496989.77000000001862,5453670.429999999702); 147 | INSERT INTO van_crimes VALUES('Mischief',2003,1,20.0,17.0,15.0,'9XX BURRARD ST','Central Business District',490952.14000000001399,5458832.4400000004096); 148 | INSERT INTO van_crimes VALUES('Mischief',2003,11,29.0,17.0,12.0,'9XX BURRARD ST','Central Business District',490952.14000000001399,5458832.4400000004096); 149 | INSERT INTO van_crimes VALUES('Mischief',2003,7,25.0,17.0,30.0,'5XX E 31ST AVE','Riley Park',493250.78000000002792,5454437.25); 150 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,1,1.0,15.0,30.0,'5X W 11TH AVE','Mount Pleasant',492289.5,5456500.4699999997391); 151 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,8.0,20.0,30.0,'5X W 11TH AVE','Mount Pleasant',492289.5,5456500.4699999997391); 152 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,24.0,15.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 153 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,5.0,17.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 154 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,13.999999999999999999,11.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 155 | INSERT INTO van_crimes VALUES('Mischief',2003,1,17.0,11.0,0.0,'10XX COTTON DR','Grandview-Woodland',494798.57000000000699,5458176.9100000001489); 156 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,17.0,15.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 157 | INSERT INTO van_crimes VALUES('Offence Against a Person',2003,6,19.0,NULL,NULL,'OFFSET TO PROTECT PRIVACY',NULL,0.0,0.0); 158 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,2,4.0,17.999999999999999999,30.0,'32XX ADANAC ST','Hastings-Sunrise',497521.2700000000186,5458304.2900000000373); 159 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,13.999999999999999999,10.0,0.0,'32XX ARBUTUS ST','Arbutus Ridge',488869.99999999999999,5456063.7999999998136); 160 | INSERT INTO van_crimes VALUES('Offence Against a Person',2003,6,19.0,NULL,NULL,'OFFSET TO PROTECT PRIVACY',NULL,0.0,0.0); 161 | INSERT INTO van_crimes VALUES('Mischief',2003,1,3.0,3.0,0.0,'5XX E 30TH AVE','Riley Park',493182.36999999999535,5454533.2900000000372); 162 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,17.0,17.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 163 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,25.999999999999999999,12.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 164 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,16.0,13.999999999999999999,0.0,'10XX SMITHE ST','West End',490890.02000000001861,5458931.8399999998509); 165 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,9.0,16.0,0.0,'48XX CAMBIE ST','Riley Park',491398.10999999998602,5454383.4299999997021); 166 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,1,1.0,12.0,0.0,'32XX ASH ST','South Cambie',491399.10999999998602,5456000.3700000001118); 167 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,19.0,5.0,17.0,'32XX BURRARD ST','Shaughnessy',489382.22999999998136,5456050.6699999999254); 168 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,27.0,15.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 169 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,3,20.0,17.999999999999999999,35.0,'32XX CAMBIE ST','Riley Park',491632.4099999999744,5456016.6399999996647); 170 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,29.0,16.0,30.0,'85XX FREMLIN ST','Marpole',490720.08000000001629,5450721.0000000000001); 171 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,27.999999999999999999,15.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 172 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,24.0,20.0,0.0,'5X W 13TH AVE','Mount Pleasant',492281.78000000002794,5456290.2099999999626); 173 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,5.0,22.0,30.0,'5X W 13TH AVE','Mount Pleasant',492282.02000000001862,5456299.3499999996272); 174 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,1.0,12.0,0.0,'20XX BARCLAY ST','West End',489775.15999999997439,5459925.9900000002235); 175 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,9.0,11.0,0.0,'20XX BARCLAY ST','West End',489775.15999999997439,5459925.9900000002235); 176 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,19.0,16.0,0.0,'5X W 14TH AVE','Mount Pleasant',492281.21999999997207,5456200.3499999996276); 177 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,11,12.999999999999999999,10.0,50.0,'10XX GRANVILLE ST','Central Business District',491027.55999999999768,5458476.4999999999999); 178 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,16.0,8.0,45.0,'20XX BARCLAY ST','West End',489775.15999999997439,5459925.9900000002235); 179 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,3,25.0,15.0,0.0,'10XX GRANVILLE ST','Central Business District',491029.65999999997437,5458478.6399999996645); 180 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,5,22.999999999999999999,8.0,45.0,'5X W 15TH AVE','Mount Pleasant',492275.86999999999534,5456100.8600000003351); 181 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,10,25.999999999999999999,4.0,0.0,'10XX GRANVILLE ST','Central Business District',491029.65999999997437,5458478.6399999996645); 182 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,7.0,15.0,30.0,'20XX BARCLAY ST','West End',489748.44000000000232,5459955.3700000001115); 183 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,1.0,15.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 184 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,5.0,7.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 185 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,12.0,12.999999999999999999,0.0,'32XX CELTIC AVE','Kerrisdale',487159.97999999998135,5451680.730000000447); 186 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,17.999999999999999999,11.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 187 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,4.0,17.999999999999999999,0.0,'20XX BARCLAY ST','West End',489748.44000000000232,5459955.3700000001115); 188 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,22.999999999999999999,8.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 189 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,10,7.0,13.999999999999999999,0.0,'20XX BALSAM ST','Kitsilano',488375.78000000002793,5457283.820000000298); 190 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,17.0,12.999999999999999999,30.0,'20XX BALSAM ST','Kitsilano',488375.78000000002793,5457283.820000000298); 191 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,10.0,8.0,30.0,'20XX ALMA ST','Kitsilano',486496.01000000000932,5457327.9599999999626); 192 | INSERT INTO van_crimes VALUES('Mischief',2003,6,25.0,15.0,0.0,'5XX E 29TH AVE','Riley Park',493160.70000000001164,5454645.3799999998881); 193 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,10,24.0,9.0,25.0,'3XX E 43RD AVE','Sunset',492767.21999999997204,5453150.7199999997392); 194 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,3.0,9.0,5.0,'20XX ALMA ST','West Point Grey',486484.45000000001166,5457256.7300000004472); 195 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,4,6.0,20.999999999999999999,0.0,'10XX HAMILTON ST','Central Business District',491229.78000000002796,5458167.040000000037); 196 | INSERT INTO van_crimes VALUES('Mischief',2003,8,12.0,12.0,22.0,'10XX COMOX ST','West End',490746.90000000002329,5458647.9500000001864); 197 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,10,6.0,13.999999999999999999,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 198 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,27.0,20.999999999999999999,0.0,'20XX ADANAC ST','Grandview-Woodland',495373.90000000002328,5458302.6200000001118); 199 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,2.0,1.0,0.0,'20O N NANAIMO ST','Hastings-Sunrise',495893.77000000001861,5459139.4500000001862); 200 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,10,29.0,9.0,30.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 201 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,11,12.0,7.0,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 202 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,8,22.999999999999999999,15.0,32.0,'30XX KITCHENER ST','Hastings-Sunrise',497089.09000000002561,5457720.9400000004095); 203 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,20.999999999999999999,2.0,0.0,'1XX WATER ST','Central Business District',492251.03999999997904,5459018.8899999996649); 204 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,2.0,22.0,0.0,'32XX COLERIDGE AVE','Killarney',497185.65000000002327,5452601.2699999995528); 205 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,3,25.999999999999999999,22.999999999999999999,0.0,'1XX WATER ST','Central Business District',492227.1500000000233,5459025.2699999995528); 206 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,3.0,12.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 207 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,5.0,12.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 208 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,6,16.0,13.999999999999999999,0.0,'32XX COLLINGWOOD ST','Dunbar-Southlands',486773.15000000002326,5456127.3799999998883); 209 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,7.0,11.0,50.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 210 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,12.999999999999999999,13.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491372.94000000000231,5453422.8300000000743); 211 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,2,13.999999999999999999,12.0,0.0,'10XX HARO ST','West End',490899.22999999998135,5458973.8600000003352); 212 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,5,12.999999999999999999,11.0,30.0,'10XX HARO ST','West End',490899.22999999998135,5458973.8600000003352); 213 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,4.0,5.0,12.0,'10XX HARO ST','West End',490899.22999999998135,5458973.8600000003352); 214 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,25.0,16.0,30.0,'10XX HARO ST','West End',490899.22999999998135,5458973.8600000003352); 215 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,11,24.0,4.0,45.999999999999999999,'1XX W PENDER ST','Central Business District',492171.04999999998836,5458703.3099999995901); 216 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,27.0,0.0,30.999999999999999999,'1XX W PENDER ST','Central Business District',492171.04999999998836,5458703.3099999995901); 217 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,7.0,17.999999999999999999,0.0,'1XX W PENDER ST','Central Business District',492171.04999999998836,5458703.3099999995901); 218 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,17.0,19.0,45.0,'1XX W PENDER ST','Central Business District',492171.04999999998836,5458703.3099999995901); 219 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,10,16.0,12.999999999999999999,10.0,'10XX HARO ST','West End',490899.22999999998135,5458973.8600000003352); 220 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,12,16.0,3.0,0.0,'10XX HARO ST','West End',490899.22999999998135,5458973.8600000003352); 221 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,3,22.0,19.0,0.0,'32XX COMMERCIAL DR','Kensington-Cedar Cottage',494928.1900000000023,5455946.1900000004097); 222 | INSERT INTO van_crimes VALUES('Vehicle Collision or Pedestrian Struck (with Injury)',2003,1,1.0,2.0,10.0,'16XX BLOCK E 20TH AVE','Kensington-Cedar Cottage',494781.00000000000001,5455505.9999999999998); 223 | INSERT INTO van_crimes VALUES('Mischief',2003,2,22.999999999999999999,19.0,0.0,'5XX E 15TH AVE','Mount Pleasant',493297.52000000001862,5456053.6100000003351); 224 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,13.999999999999999999,12.999999999999999999,0.0,'6XX W 41ST AVE','Oakridge',491397.53000000002793,5453421.3899999996648); 225 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,19.0,0.0,30.0,'6XX W 45TH AVE','Oakridge',491405.69000000000232,5453012.3799999998882); 226 | INSERT INTO van_crimes VALUES('Mischief',2003,1,22.999999999999999999,20.0,0.0,'9XX BUTE ST','West End',490544.46000000002095,5459030.3700000001119); 227 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,5,25.999999999999999999,20.999999999999999999,30.0,'6XX W 45TH AVE','Oakridge',491405.69000000000232,5453012.3799999998882); 228 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,8,15.0,15.0,30.0,'4XX SEMLIN DR','Grandview-Woodland',495376.35999999998603,5458711.7599999997762); 229 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,10,8.0,17.999999999999999999,0.0,'42XX W 11TH AVE','West Point Grey',485428.29999999998836,5456693.3799999998884); 230 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,16.0,11.0,0.0,'85XX CAMBIE ST','Marpole',491467.41999999998371,5450647.0499999998139); 231 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,11.0,0.0,0.0,'32XX COMMERCIAL DR','Kensington-Cedar Cottage',494928.1900000000023,5455946.1900000004097); 232 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,6,17.0,17.0,0.0,'6XX W 45TH AVE','Oakridge',491405.69000000000232,5453012.3799999998882); 233 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,12,25.999999999999999999,15.0,0.0,'11XX BARCLAY ST','West End',490720.4899999999907,5459002.9900000002233); 234 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,10,27.0,17.999999999999999999,0.0,'85XX CAMBIE ST','Marpole',491467.41999999998371,5450647.0499999998139); 235 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,11,19.0,9.0,0.0,'85XX CAMBIE ST','Marpole',491458.63000000000464,5450662.5000000000001); 236 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,11,27.0,8.0,30.0,'10XX HARO ST','West End',490907.03000000002792,5458966.1200000001118); 237 | INSERT INTO van_crimes VALUES('Mischief',2003,3,8.0,6.0,8.0,'10XX COMOX ST','West End',490699.52000000001861,5458708.2000000001864); 238 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,12,3.0,20.0,41.999999999999999998,'30XX KNIGHT ST','Mount Pleasant',494440.97999999998137,5456067.1900000004097); 239 | INSERT INTO van_crimes VALUES('Mischief',2003,1,5.0,20.999999999999999999,0.0,'5XX E 13TH AVE','Mount Pleasant',493235.09999999997671,5456228.7900000000372); 240 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,16.0,22.0,0.0,'6XX W 57TH AVE','Marpole',491358.15999999997438,5451812.4299999997021); 241 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,8,12.0,17.999999999999999999,0.0,'6XX W 57TH AVE','Marpole',491358.15999999997438,5451812.4299999997021); 242 | INSERT INTO van_crimes VALUES('Mischief',2003,10,25.999999999999999999,19.0,0.0,'5XX E 11TH AVE','Mount Pleasant',493237.90999999997438,5456431.5999999996272); 243 | INSERT INTO van_crimes VALUES('Mischief',2003,7,17.0,8.0,30.0,'5XX E 11TH AVE','Mount Pleasant',493237.90999999997438,5456431.5999999996272); 244 | INSERT INTO van_crimes VALUES('Mischief',2003,11,9.0,5.0,0.0,'10XX COMOX ST','West End',490671.52000000001862,5458723.2400000002233); 245 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,9,22.999999999999999999,16.0,0.0,'6XX W 57TH AVE','Marpole',491358.15999999997438,5451812.4299999997021); 246 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,11,8.0,7.0,0.0,'6XX W 57TH AVE','Marpole',491358.15999999997438,5451812.4299999997021); 247 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,1,24.0,7.0,45.0,'10XX HARWOOD ST','West End',490333.13000000000466,5458440.7999999998138); 248 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,17.999999999999999999,12.999999999999999999,30.0,'1XX W PENDER ST','Central Business District',492073.21000000002093,5458730.2599999997765); 249 | INSERT INTO van_crimes VALUES('Theft from Vehicle',2003,9,29.0,22.999999999999999999,25.999999999999999999,'84XX VICTORIA DR','Victoria-Fraserview',495186.46000000002094,5450567.3700000001119); 250 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,1,27.0,15.0,45.0,'10XX HARWOOD ST','West End',490348.95000000001162,5458424.6900000004099); 251 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,9.0,22.0,0.0,'6XX W 6TH AVE','Fairview',491448.96999999997206,5457012.2900000000371); 252 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,7,13.999999999999999999,22.999999999999999999,59.0,'6XX W 7TH AVE','Fairview',491386.59000000002559,5456921.1500000003724); 253 | INSERT INTO van_crimes VALUES('Mischief',2003,2,27.999999999999999999,22.0,0.0,'5XX DUNSMUIR ST','Central Business District',491675.71000000002095,5458858.9599999999628); 254 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,11,24.0,12.0,0.0,'6XX W 7TH AVE','Fairview',491446.64000000001396,5456919.1299999998882); 255 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,1,13.999999999999999999,17.999999999999999999,0.0,'6XX W 8TH AVE','Fairview',491445.25000000000001,5456826.0099999997764); 256 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,1,22.999999999999999999,10.0,0.0,'10XX HARWOOD ST','West End',490370.03999999997905,5458403.2099999999628); 257 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,2,2.0,12.999999999999999999,0.0,'10XX HARWOOD ST','West End',490370.03999999997905,5458403.2099999999628); 258 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,2,12.0,17.999999999999999999,0.0,'10XX HARWOOD ST','West End',490370.03999999997905,5458403.2099999999628); 259 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,12,17.0,17.0,0.0,'1XX W KENT S AV','Marpole',492065.04999999998834,5450413.0899999998511); 260 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,2,15.0,8.0,0.0,'10XX HARWOOD ST','West End',490370.03999999997905,5458403.2099999999628); 261 | INSERT INTO van_crimes VALUES('Break and Enter Residential/Other',2003,6,11.0,15.0,45.0,'10XX HARWOOD ST','West End',490370.03999999997905,5458403.2099999999628); 262 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,4,1.0,20.999999999999999999,0.0,'6XX W 8TH AVE','Fairview',491445.25000000000001,5456826.0099999997764); 263 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,8,29.0,22.999999999999999999,0.0,'6XX W 8TH AVE','Fairview',491445.25000000000001,5456826.0099999997764); 264 | INSERT INTO van_crimes VALUES('Theft of Vehicle',2003,2,6.0,9.0,10.0,'6XX W CORDOVA ST','Central Business District',491865.23999999999068,5459187.8499999996273); 265 | COMMIT; 266 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import sqlite3 4 | 5 | # create a new connection to a db in memory 6 | conn = sqlite3.connect(':memory:') 7 | 8 | # create a cursor 9 | c = conn.cursor() 10 | 11 | # restore the given van_crime_2003.sql dump 12 | c.executescript(open('van_crime_2003.sql', 'r').read()) 13 | 14 | # your code goes here 15 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/solutions/solution_van_crimes_sql.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import sqlite3 4 | 5 | # create a new connection to a db in memory 6 | conn = sqlite3.connect(':memory:') 7 | 8 | # create a cursor 9 | c = conn.cursor() 10 | 11 | # restore the given van_crime_2003.sql dump 12 | c.executescript(open('van_crime_2003.sql', 'r').read()) 13 | 14 | van_crimes_df = pd.read_sql('SELECT * FROM van_crimes WHERE hour > 14', conn) 15 | 16 | late_crimes = van_crimes_df.loc[van_crimes_df['HOUR'] > 18] 17 | 18 | dangerous_month_crimes = van_crimes_df.loc[:, 'MONTH'].value_counts().head(1) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/tests/test_crimes_1.py: -------------------------------------------------------------------------------- 1 | def test_crimes_1(): 2 | assert van_crimes_df.shape == (126, 10) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/tests/test_crimes_2.py: -------------------------------------------------------------------------------- 1 | def test_crimes_2(): 2 | assert van_crimes_df.loc[14, 'HOUR'] == 23 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/tests/test_dangerous_month_1.py: -------------------------------------------------------------------------------- 1 | def test_dangerous_month_1(): 2 | assert dangerous_month_crimes.values[0] == 17 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/tests/test_dangerous_month_2.py: -------------------------------------------------------------------------------- 1 | def test_dangerous_month_2(): 2 | assert dangerous_month_crimes.index[0] == 6 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/tests/test_late_crimes_1.py: -------------------------------------------------------------------------------- 1 | def test_late_crimes_1(): 2 | assert late_crimes.shape == (57, 10) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-12-vancouver-crime-information/tests/test_late_crimes_2.py: -------------------------------------------------------------------------------- 1 | def test_late_crimes_2(): 2 | assert late_crimes.loc[7, 'HOUR'] == 20 -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/.rmotr: -------------------------------------------------------------------------------- 1 | uuid = "78b15368-70e4-400b-8170-d811c440e4c0" 2 | name = "Querying Vancouver crimes" 3 | type = "assignment" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/README.md: -------------------------------------------------------------------------------- 1 | # Querying Vancouver crimes 2 | 3 | Using the given sqlite3 connection: 4 | - Select `TYPE`, `MONTH`, `DAY` and `NEIGHBOURHOOD` from the `van_crimes` table, but only the crime observations from `Stanley Park` or `West End`. Store the information in a `van_crimes_df` DataFrame. 5 | - Store the count of crimes per `TYPE` in a `crime_types_count` variable. -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import sqlite3 4 | 5 | # create a new connection to a db in memory 6 | conn = sqlite3.connect(':memory:') 7 | 8 | # create a cursor 9 | c = conn.cursor() 10 | 11 | # restore the given van_crime_2003.sql dump 12 | c.executescript(open('van_crime_2003.sql', 'r').read()) 13 | 14 | # your code goes here 15 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/solutions/solution_van_crimes.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import sqlite3 4 | 5 | # create a new connection to a db in memory 6 | conn = sqlite3.connect(':memory:') 7 | 8 | # create a cursor 9 | c = conn.cursor() 10 | 11 | # restore the given van_crime_2003.sql dump 12 | c.executescript(open('van_crime_2003.sql', 'r').read()) 13 | 14 | van_crimes_df = pd.read_sql('''SELECT TYPE, MONTH, DAY, NEIGHBOURHOOD 15 | FROM van_crimes WHERE NEIGHBOURHOOD IN ("Stanley Park", "West End")''', conn) 16 | 17 | crime_types_count = van_crimes_df['TYPE'].value_counts() 18 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/tests/test_crime_types_1.py: -------------------------------------------------------------------------------- 1 | def test_crime_types_1(): 2 | assert crime_types_count.shape == (4,) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/tests/test_crime_types_2.py: -------------------------------------------------------------------------------- 1 | def test_crime_types_2(): 2 | assert crime_types_count.sum() == 64 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/tests/test_crime_types_3.py: -------------------------------------------------------------------------------- 1 | def test_crime_types_3(): 2 | assert crime_types_count[1] == 15 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/tests/test_crimes_1.py: -------------------------------------------------------------------------------- 1 | def test_crimes_1(): 2 | assert van_crimes_df.shape == (64, 4) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-13-querying-vancouver-crimes/tests/test_crimes_2.py: -------------------------------------------------------------------------------- 1 | def test_crimes_2(): 2 | assert van_crimes_df.loc[3, 'DAY'] == 12.0 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/.rmotr: -------------------------------------------------------------------------------- 1 | uuid = "1c120624-db0c-4809-8b3c-e8154314adb0" 2 | name = "Crypto currency database" 3 | type = "assignment" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/README.md: -------------------------------------------------------------------------------- 1 | # Crypto currency database 2 | 3 | The database we will use contains two tables `cryptocoins_cryptocurrency` and `cryptocoins_exchange`. 4 | 5 | Using the given sqlite3 connection and the `read_sql` method write a single query that: 6 | - Join both tables and return the list of cryptocurrencies with its exchanges. You should use the column with the exchange ID on each table to perform the join. 7 | - As both tables have a `name` column you should rename `cryptocoins_cryptocurrency.name` as `coin_name` and `cryptocoins_exchange.name` as `exchange`. Also select `symbol`, `price_usd` and `percent_change_7d` columns. 8 | - Store the information in a `crypto_df` DataFrame. 9 | 10 | - Once you have the `crypto_df` DataFrame, create a new `weekly_change_df` with the `crypto_df` data sorted by `percent_change_7d` from highest to lowest. 11 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/files/cryptos.sql: -------------------------------------------------------------------------------- 1 | PRAGMA foreign_keys=OFF; 2 | BEGIN TRANSACTION; 3 | CREATE TABLE IF NOT EXISTS "django_migrations" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app" varchar(255) NOT NULL, "name" varchar(255) NOT NULL, "applied" datetime NOT NULL); 4 | INSERT INTO django_migrations VALUES(1,'contenttypes','0001_initial','2019-11-14 13:02:12.462536'); 5 | INSERT INTO django_migrations VALUES(2,'auth','0001_initial','2019-11-14 13:02:12.531262'); 6 | INSERT INTO django_migrations VALUES(3,'admin','0001_initial','2019-11-14 13:02:12.563584'); 7 | INSERT INTO django_migrations VALUES(4,'admin','0002_logentry_remove_auto_add','2019-11-14 13:02:12.615214'); 8 | INSERT INTO django_migrations VALUES(5,'admin','0003_logentry_add_action_flag_choices','2019-11-14 13:02:12.661766'); 9 | INSERT INTO django_migrations VALUES(6,'contenttypes','0002_remove_content_type_name','2019-11-14 13:02:12.739565'); 10 | INSERT INTO django_migrations VALUES(7,'auth','0002_alter_permission_name_max_length','2019-11-14 13:02:12.762174'); 11 | INSERT INTO django_migrations VALUES(8,'auth','0003_alter_user_email_max_length','2019-11-14 13:02:12.815454'); 12 | INSERT INTO django_migrations VALUES(9,'auth','0004_alter_user_username_opts','2019-11-14 13:02:12.848559'); 13 | INSERT INTO django_migrations VALUES(10,'auth','0005_alter_user_last_login_null','2019-11-14 13:02:12.895415'); 14 | INSERT INTO django_migrations VALUES(11,'auth','0006_require_contenttypes_0002','2019-11-14 13:02:12.910203'); 15 | INSERT INTO django_migrations VALUES(12,'auth','0007_alter_validators_add_error_messages','2019-11-14 13:02:12.949161'); 16 | INSERT INTO django_migrations VALUES(13,'auth','0008_alter_user_username_max_length','2019-11-14 13:02:12.984443'); 17 | INSERT INTO django_migrations VALUES(14,'auth','0009_alter_user_last_name_max_length','2019-11-14 13:02:13.021366'); 18 | INSERT INTO django_migrations VALUES(15,'auth','0010_alter_group_name_max_length','2019-11-14 13:02:13.068418'); 19 | INSERT INTO django_migrations VALUES(16,'auth','0011_update_proxy_permissions','2019-11-14 13:02:13.093113'); 20 | INSERT INTO django_migrations VALUES(17,'cryptocoins','0001_initial','2019-11-14 13:02:13.110334'); 21 | INSERT INTO django_migrations VALUES(18,'cryptocoins','0002_auto_20181227_1931','2019-11-14 13:02:13.138270'); 22 | INSERT INTO django_migrations VALUES(19,'cryptocoins','0003_auto_20181228_1426','2019-11-14 13:02:13.163701'); 23 | INSERT INTO django_migrations VALUES(20,'sessions','0001_initial','2019-11-14 13:02:13.178247'); 24 | CREATE TABLE IF NOT EXISTS "auth_group_permissions" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "group_id" integer NOT NULL REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED, "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id") DEFERRABLE INITIALLY DEFERRED); 25 | CREATE TABLE IF NOT EXISTS "auth_user_groups" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, "group_id" integer NOT NULL REFERENCES "auth_group" ("id") DEFERRABLE INITIALLY DEFERRED); 26 | CREATE TABLE IF NOT EXISTS "auth_user_user_permissions" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id") DEFERRABLE INITIALLY DEFERRED); 27 | CREATE TABLE IF NOT EXISTS "django_admin_log" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "action_time" datetime NOT NULL, "object_id" text NULL, "object_repr" varchar(200) NOT NULL, "change_message" text NOT NULL, "content_type_id" integer NULL REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED, "user_id" integer NOT NULL REFERENCES "auth_user" ("id") DEFERRABLE INITIALLY DEFERRED, "action_flag" smallint unsigned NOT NULL CHECK ("action_flag" >= 0)); 28 | CREATE TABLE IF NOT EXISTS "django_content_type" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "app_label" varchar(100) NOT NULL, "model" varchar(100) NOT NULL); 29 | INSERT INTO django_content_type VALUES(1,'admin','logentry'); 30 | INSERT INTO django_content_type VALUES(2,'auth','permission'); 31 | INSERT INTO django_content_type VALUES(3,'auth','group'); 32 | INSERT INTO django_content_type VALUES(4,'auth','user'); 33 | INSERT INTO django_content_type VALUES(5,'contenttypes','contenttype'); 34 | INSERT INTO django_content_type VALUES(6,'sessions','session'); 35 | INSERT INTO django_content_type VALUES(7,'cryptocoins','cryptocurrency'); 36 | INSERT INTO django_content_type VALUES(8,'cryptocoins','exchange'); 37 | CREATE TABLE IF NOT EXISTS "auth_permission" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "content_type_id" integer NOT NULL REFERENCES "django_content_type" ("id") DEFERRABLE INITIALLY DEFERRED, "codename" varchar(100) NOT NULL, "name" varchar(255) NOT NULL); 38 | INSERT INTO auth_permission VALUES(1,1,'add_logentry','Can add log entry'); 39 | INSERT INTO auth_permission VALUES(2,1,'change_logentry','Can change log entry'); 40 | INSERT INTO auth_permission VALUES(3,1,'delete_logentry','Can delete log entry'); 41 | INSERT INTO auth_permission VALUES(4,1,'view_logentry','Can view log entry'); 42 | INSERT INTO auth_permission VALUES(5,2,'add_permission','Can add permission'); 43 | INSERT INTO auth_permission VALUES(6,2,'change_permission','Can change permission'); 44 | INSERT INTO auth_permission VALUES(7,2,'delete_permission','Can delete permission'); 45 | INSERT INTO auth_permission VALUES(8,2,'view_permission','Can view permission'); 46 | INSERT INTO auth_permission VALUES(9,3,'add_group','Can add group'); 47 | INSERT INTO auth_permission VALUES(10,3,'change_group','Can change group'); 48 | INSERT INTO auth_permission VALUES(11,3,'delete_group','Can delete group'); 49 | INSERT INTO auth_permission VALUES(12,3,'view_group','Can view group'); 50 | INSERT INTO auth_permission VALUES(13,4,'add_user','Can add user'); 51 | INSERT INTO auth_permission VALUES(14,4,'change_user','Can change user'); 52 | INSERT INTO auth_permission VALUES(15,4,'delete_user','Can delete user'); 53 | INSERT INTO auth_permission VALUES(16,4,'view_user','Can view user'); 54 | INSERT INTO auth_permission VALUES(17,5,'add_contenttype','Can add content type'); 55 | INSERT INTO auth_permission VALUES(18,5,'change_contenttype','Can change content type'); 56 | INSERT INTO auth_permission VALUES(19,5,'delete_contenttype','Can delete content type'); 57 | INSERT INTO auth_permission VALUES(20,5,'view_contenttype','Can view content type'); 58 | INSERT INTO auth_permission VALUES(21,6,'add_session','Can add session'); 59 | INSERT INTO auth_permission VALUES(22,6,'change_session','Can change session'); 60 | INSERT INTO auth_permission VALUES(23,6,'delete_session','Can delete session'); 61 | INSERT INTO auth_permission VALUES(24,6,'view_session','Can view session'); 62 | INSERT INTO auth_permission VALUES(25,7,'add_cryptocurrency','Can add Cryptocurrency'); 63 | INSERT INTO auth_permission VALUES(26,7,'change_cryptocurrency','Can change Cryptocurrency'); 64 | INSERT INTO auth_permission VALUES(27,7,'delete_cryptocurrency','Can delete Cryptocurrency'); 65 | INSERT INTO auth_permission VALUES(28,7,'view_cryptocurrency','Can view Cryptocurrency'); 66 | INSERT INTO auth_permission VALUES(29,8,'add_exchange','Can add exchange'); 67 | INSERT INTO auth_permission VALUES(30,8,'change_exchange','Can change exchange'); 68 | INSERT INTO auth_permission VALUES(31,8,'delete_exchange','Can delete exchange'); 69 | INSERT INTO auth_permission VALUES(32,8,'view_exchange','Can view exchange'); 70 | CREATE TABLE IF NOT EXISTS "auth_user" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "password" varchar(128) NOT NULL, "last_login" datetime NULL, "is_superuser" bool NOT NULL, "username" varchar(150) NOT NULL UNIQUE, "first_name" varchar(30) NOT NULL, "email" varchar(254) NOT NULL, "is_staff" bool NOT NULL, "is_active" bool NOT NULL, "date_joined" datetime NOT NULL, "last_name" varchar(150) NOT NULL); 71 | CREATE TABLE IF NOT EXISTS "auth_group" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(150) NOT NULL UNIQUE); 72 | CREATE TABLE IF NOT EXISTS "cryptocoins_exchange" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL, "url" varchar(1200) NOT NULL); 73 | INSERT INTO cryptocoins_exchange VALUES(1,'Bitstamp','https://www.bitstamp.net'); 74 | INSERT INTO cryptocoins_exchange VALUES(2,'Poloniex','https://poloniex.com'); 75 | INSERT INTO cryptocoins_exchange VALUES(3,'Binance','https://www.binance.com/'); 76 | INSERT INTO cryptocoins_exchange VALUES(4,'OKEx','https://www.okex.com'); 77 | CREATE TABLE IF NOT EXISTS "cryptocoins_cryptocurrency" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "name" varchar(100) NOT NULL, "slug" varchar(100) NOT NULL, "symbol" varchar(10) NOT NULL, "rank" integer NOT NULL, "price_usd" decimal NOT NULL, "price_btc" decimal NOT NULL, "volume_usd_24h" decimal NOT NULL, "market_cap_usd" decimal NOT NULL, "available_supply" decimal NOT NULL, "total_supply" decimal NOT NULL, "max_supply" decimal NULL, "percent_change_1h" decimal NOT NULL, "percent_change_24h" decimal NOT NULL, "percent_change_7d" decimal NOT NULL, "exchange_id" integer NOT NULL REFERENCES "cryptocoins_exchange" ("id") DEFERRABLE INITIALLY DEFERRED, "last_updated" datetime NOT NULL); 78 | INSERT INTO cryptocoins_cryptocurrency VALUES(1,'Bitcoin','bitcoin','BTC',1,8707.3700000000008002,1,18743290913.099998474,157139896329,18046762,18046762,21000000,-0.11999999999999999555,-1.080000000000000071,-5.9100000000000001421,1,'2019-11-14 13:02:23.293956'); 79 | INSERT INTO cryptocoins_cryptocurrency VALUES(2,'Ethereum','ethereum','ETH',2,186.49999999999999999,0.021432699999999998974,7703153953.0900001526,20244944406,108549236,108549236,NULL,-0.20999999999999999222,-0.33000000000000001554,-0.66000000000000003108,1,'2019-11-14 13:02:23.326936'); 80 | INSERT INTO cryptocoins_cryptocurrency VALUES(3,'XRP','ripple','XRP',3,0.27000000000000001776,3.0800000000000003264e-05,1320452064.109999895,11621563439,43298481757,99991298961,100000000000,-0.33000000000000001554,-1.830000000000000071,-8.2200000000000006394,1,'2019-11-14 13:02:23.337368'); 81 | INSERT INTO cryptocoins_cryptocurrency VALUES(4,'Bitcoin Cash','bitcoin-cash','BCH',4,278.92000000000001591,0.032052900000000002223,1759248534.3499999045,5051906817,18112350,18112350,21000000,0.17000000000000001221,-3,-4.7599999999999997868,3,'2019-11-14 13:02:23.348683'); 82 | INSERT INTO cryptocoins_cryptocurrency VALUES(5,'Tether','tether','USDT',5,1.0100000000000000088,0.00011589999999999999824,21723260838.700000762,4141681919,4108044456,4207771504,NULL,-0.23000000000000000999,0.33000000000000001554,0.4500000000000000111,1,'2019-11-14 13:02:23.360212'); 83 | INSERT INTO cryptocoins_cryptocurrency VALUES(6,'Litecoin','litecoin','LTC',6,59.590000000000003408,0.0068474000000000000143,3109257723.480000019,3794246681,63677546,63677546,84000000,-0.23999999999999999111,-2.8799999999999998934,-4.0999999999999996447,2,'2019-11-14 13:02:23.368167'); 84 | INSERT INTO cryptocoins_cryptocurrency VALUES(7,'Binance Coin','binance-coin','BNB',7,21.059999999999998721,0.0024204000000000000687,249492508.88999998569,3275971500,155536713,187536713,187536713,-0.17000000000000001221,-1.4499999999999999555,2.830000000000000071,4,'2019-11-14 13:02:23.379461'); 85 | INSERT INTO cryptocoins_cryptocurrency VALUES(8,'EOS','eos','EOS',8,3.3999999999999999111,0.00039090000000000001481,1860935907.3099999427,3198081552,940122499,1036822510,NULL,-0.17000000000000001221,-2.080000000000000071,-2.9399999999999999467,4,'2019-11-14 13:02:23.392886'); 86 | INSERT INTO cryptocoins_cryptocurrency VALUES(9,'Bitcoin SV','bitcoin-sv','BSV',9,126.96999999999999886,0.014591500000000000303,530074998.47000002861,2294203717,18068415,18068415,21000000,-0.040000000000000000832,-2.3199999999999998401,-5.3600000000000003197,4,'2019-11-14 13:02:23.401673'); 87 | INSERT INTO cryptocoins_cryptocurrency VALUES(10,'Stellar','stellar','XLM',10,0.070000000000000006661,8.4999999999999999332e-06,221781703.96000000835,1487705781,20054779554,50000000000,NULL,-0.38000000000000000444,-3.5699999999999998401,-1.4899999999999999911,3,'2019-11-14 13:02:23.561750'); 88 | INSERT INTO cryptocoins_cryptocurrency VALUES(11,'TRON','tron','TRX',11,0.020000000000000000416,2.2000000000000001121e-06,980490610.1900000572,1287970796,66682072191,99281283754,NULL,-0.19000000000000000222,-3.2700000000000000177,-1.3400000000000000799,4,'2019-11-14 13:02:23.580556'); 89 | INSERT INTO cryptocoins_cryptocurrency VALUES(12,'Monero','monero','XMR',12,65.409999999999996591,0.007516700000000000291,216295403.15000000596,1132053140,17307191,17307191,NULL,0.40999999999999997557,2.0299999999999998046,2.4100000000000001421,4,'2019-11-14 13:02:23.865186'); 90 | INSERT INTO cryptocoins_cryptocurrency VALUES(13,'Chainlink','chainlink','LINK',13,3.1499999999999999111,0.00036150000000000000492,222650743.00999999046,1100874804,350000000,1000000000,NULL,0.059999999999999997779,4.9100000000000001421,16.929999999999999715,2,'2019-11-14 13:02:24.018831'); 91 | INSERT INTO cryptocoins_cryptocurrency VALUES(14,'Cardano','cardano','ADA',14,0.040000000000000000832,4.8999999999999996722e-06,50109279.409999996422,1100802773,25927070538,31112483745,45000000000,-0.30999999999999999777,-2.8900000000000001243,-2.2000000000000001776,4,'2019-11-14 13:02:24.028154'); 92 | INSERT INTO cryptocoins_cryptocurrency VALUES(15,'UNUS SED LEO','unus-sed-leo','LEO',15,0.95999999999999996447,0.00011079999999999999625,10350055.089999999851,964089675,999498893,999498893,NULL,0.25,-0.78000000000000002664,-2.1200000000000001065,3,'2019-11-14 13:02:24.041260'); 93 | INSERT INTO cryptocoins_cryptocurrency VALUES(16,'Huobi Token','huobi-token','HT',16,3.8199999999999998401,0.00043859999999999998163,139824241.05000001192,920975914,241284047,500000000,NULL,-0.16000000000000000333,-1.1299999999999998934,-4.2400000000000002131,4,'2019-11-14 13:02:24.073342'); 94 | INSERT INTO cryptocoins_cryptocurrency VALUES(17,'NEO','neo','NEO',17,12.630000000000000781,0.0014510000000000000328,586311923.59000003336,890634200,70538831,100000000,100000000,-0.070000000000000006661,-2.7299999999999999822,15.919999999999999928,4,'2019-11-14 13:02:24.090088'); 95 | INSERT INTO cryptocoins_cryptocurrency VALUES(18,'Tezos','tezos','XTZ',18,1.1299999999999998934,0.00013039999999999999833,23753112.120000001042,749360971,660373612,801312599,NULL,-0.25,-2.0600000000000000532,-4.3099999999999996092,1,'2019-11-14 13:02:24.109797'); 96 | INSERT INTO cryptocoins_cryptocurrency VALUES(19,'Cosmos','cosmos','ATOM',19,3.8799999999999998934,0.00044589999999999999644,149563435.88999998569,739868623,190688439,237928231,NULL,0.2000000000000000111,-4.1200000000000001065,4.1399999999999996802,4,'2019-11-14 13:02:24.161413'); 97 | INSERT INTO cryptocoins_cryptocurrency VALUES(20,'IOTA','iota','MIOTA',20,0.26000000000000000888,3.0300000000000001276e-05,11630413.929999999702,732692541,2779530283,2779530283,2779530283,-0.28999999999999998001,1.1399999999999999023,-3.2599999999999997868,4,'2019-11-14 13:02:24.331084'); 98 | INSERT INTO cryptocoins_cryptocurrency VALUES(21,'Maker','maker','MKR',21,648.21000000000003637,0.074490700000000006908,5322465.8899999996645,648209078,1000000,1000000,NULL,-0.6899999999999999467,-1.1999999999999999555,6.5400000000000000355,3,'2019-11-14 13:02:24.340798'); 99 | INSERT INTO cryptocoins_cryptocurrency VALUES(22,'Dash','dash','DASH',22,69.180000000000006822,0.0079503999999999998282,358987265.99000000954,633244873,9153124,9153124,18900000,-0.14999999999999999444,-1.6999999999999999555,-5.3799999999999998934,4,'2019-11-14 13:02:24.350610'); 100 | INSERT INTO cryptocoins_cryptocurrency VALUES(23,'Ethereum Classic','ethereum-classic','ETC',23,4.75,0.00054640000000000005404,639189241.87999999523,547166873,115073018,115073018,210000000,-0.11999999999999999555,-2.9500000000000001776,-7.830000000000000071,2,'2019-11-14 13:02:24.374421'); 101 | INSERT INTO cryptocoins_cryptocurrency VALUES(24,'Ontology','ontology','ONT',24,0.88000000000000000444,0.0001006999999999999947,153960527.11000001431,514697022,587351170,1000000000,NULL,-0.4500000000000000111,-5.7999999999999998223,0.050000000000000002775,1,'2019-11-14 13:02:24.383615'); 102 | INSERT INTO cryptocoins_cryptocurrency VALUES(25,'Crypto.com Coin','crypto-com-coin','CRO',25,0.040000000000000000832,4.500000000000000114e-06,23145358.359999999404,461253310,11666666667,100000000000,NULL,-1.25,13.859999999999999431,1.1699999999999999289,2,'2019-11-14 13:02:24.408253'); 103 | INSERT INTO cryptocoins_cryptocurrency VALUES(26,'USD Coin','usd-coin','USDC',26,1.0100000000000000088,0.00011620000000000000554,211667810.84000000356,444921174,440065018,442508265,NULL,-0.27000000000000001776,0.5500000000000000444,0.61999999999999999555,2,'2019-11-14 13:02:24.428173'); 104 | INSERT INTO cryptocoins_cryptocurrency VALUES(27,'VeChain','vechain','VET',27,0.010000000000000000208,7.9999999999999996378e-07,80948625.870000004769,365184175,55454734800,86712634466,NULL,1.6399999999999999023,2.5499999999999998223,21.489999999999998437,4,'2019-11-14 13:02:24.462966'); 105 | INSERT INTO cryptocoins_cryptocurrency VALUES(28,'INO COIN','ino-coin','INO',28,2,0.00022939999999999999237,5487.4499999999998178,359383477,180003180,1000000000,NULL,-0.13000000000000000444,-0.39000000000000001332,-1.2399999999999999911,2,'2019-11-14 13:02:24.472383'); 106 | INSERT INTO cryptocoins_cryptocurrency VALUES(29,'NEM','nem','XEM',29,0.040000000000000000832,4.6000000000000000038e-06,8646519.6799999997018,358752998,8999999999,8999999999,NULL,0.059999999999999997779,-1.4199999999999999289,-5.0999999999999996447,3,'2019-11-14 13:02:24.482358'); 107 | INSERT INTO cryptocoins_cryptocurrency VALUES(30,'Basic Attention Token','basic-attention-token','BAT',30,0.26000000000000000888,3.0199999999999998846e-05,77159231.019999995828,356011837,1356386751,1500000000,NULL,-0.23999999999999999111,6.7999999999999998223,3.2799999999999998046,1,'2019-11-14 13:02:24.492277'); 108 | INSERT INTO cryptocoins_cryptocurrency VALUES(31,'Dogecoin','dogecoin','DOGE',31,0,2.9999999999999998642e-07,78189929.299999997021,322901925,122050253672,122050253672,NULL,-0.28000000000000002664,-1.1399999999999999023,-0.94999999999999995559,2,'2019-11-14 13:02:24.510996'); 109 | INSERT INTO cryptocoins_cryptocurrency VALUES(32,'Zcash','zcash','ZEC',32,36.679999999999999716,0.0042154000000000002232,129864301.39000000059,287911709,7848794,7848794,NULL,-0.5500000000000000444,-0.98999999999999999111,-5.5199999999999995736,1,'2019-11-14 13:02:24.524844'); 110 | INSERT INTO cryptocoins_cryptocurrency VALUES(33,'PRIZM','prizm','PZM',33,0.68000000000000004884,7.8200000000000003449e-05,477464.929999999993,261891479,385100587,385100587,6000000000,0.080000000000000001665,0.91000000000000003108,-12.230000000000000425,2,'2019-11-14 13:02:24.535839'); 111 | INSERT INTO cryptocoins_cryptocurrency VALUES(34,'Paxos Standard','paxos-standard','PAX',34,1.0100000000000000088,0.00011629999999999999441,192326585.62000000476,232199989,229434803,229937967,NULL,-0.2000000000000000111,0.51000000000000000888,0.66000000000000003108,1,'2019-11-14 13:02:24.552107'); 112 | INSERT INTO cryptocoins_cryptocurrency VALUES(35,'Decred','decred','DCR',35,21.60999999999999943,0.0024837999999999999835,13546490.949999999255,230681127,10672670,10672670,21000000,1.7900000000000000355,-1.8400000000000000799,1.90999999999999992,4,'2019-11-14 13:02:24.563973'); 113 | INSERT INTO cryptocoins_cryptocurrency VALUES(36,'Insight Chain','insight-chain','INB',36,0.64000000000000001332,7.3399999999999995196e-05,13333700.019999999553,223477311,349902689,10000000000,NULL,-0.48999999999999999111,-6.9599999999999999644,-13.369999999999999217,1,'2019-11-14 13:02:24.575116'); 114 | INSERT INTO cryptocoins_cryptocurrency VALUES(37,'MEXC Token','mexc-token','MEXC',37,0.23999999999999999111,2.7200000000000000462e-05,356174.72999999998137,217686670,920072826,1433904862,1714285714,-0.28000000000000002664,0.28999999999999998001,8.7400000000000002131,4,'2019-11-14 13:02:24.608218'); 115 | INSERT INTO cryptocoins_cryptocurrency VALUES(38,'Qtum','qtum','QTUM',38,2.25,0.0002585999999999999974,334558632.12000000476,216424168,96163212,101913232,107822406,-0.28999999999999998001,-1.1299999999999998934,1.7600000000000000088,3,'2019-11-14 13:02:24.639749'); 116 | INSERT INTO cryptocoins_cryptocurrency VALUES(39,'HedgeTrade','hedgetrade','HEDG',39,0.71999999999999997335,8.2499999999999999548e-05,198293.3399999999965,207075296,288330855,1000000000,NULL,-0.72999999999999998223,-0.93000000000000004884,-6.2999999999999998223,1,'2019-11-14 13:02:24.678272'); 117 | INSERT INTO cryptocoins_cryptocurrency VALUES(40,'MINDOL','mindol','MIN',40,1.3600000000000000976,0.00015589999999999999474,3371581.9399999999441,191764561,141339316,240000000,NULL,-9.1199999999999992184,-18.670000000000001705,72.900000000000005685,1,'2019-11-14 13:02:24.691118'); 118 | INSERT INTO cryptocoins_cryptocurrency VALUES(41,'0x','0x','ZRX',41,0.28999999999999998001,3.2900000000000000099e-05,55713994.380000002684,172208038,602005041,1000000000,NULL,-1.0100000000000000088,-4.7400000000000002131,-5.3899999999999996802,4,'2019-11-14 13:02:24.702137'); 119 | INSERT INTO cryptocoins_cryptocurrency VALUES(42,'ThoreNext','thorenext','THX',42,7.8899999999999996802,0.00090689999999999998045,161700.51999999998952,170877665,21652254,210000000,210000000,-0.25,2.7000000000000001776,-6.2099999999999999644,1,'2019-11-14 13:02:24.713124'); 120 | INSERT INTO cryptocoins_cryptocurrency VALUES(43,'TrueUSD','trueusd','TUSD',43,1.0100000000000000088,0.00011610000000000000311,140353201.24000000953,170394435,168616679,168616679,NULL,-0.10000000000000000555,0.46999999999999997335,0.6500000000000000222,3,'2019-11-14 13:02:24.723933'); 121 | INSERT INTO cryptocoins_cryptocurrency VALUES(44,'Holo','holo','HOT',44,0,9.9999999999999995472e-08,12943946.480000000446,159168861,161335841957,177619433541,NULL,0.30999999999999999777,-2.3599999999999998756,1.3000000000000000444,1,'2019-11-14 13:02:24.745011'); 122 | INSERT INTO cryptocoins_cryptocurrency VALUES(45,'Centrality','centrality','CENNZ',45,0.14000000000000001332,1.6600000000000000307e-05,521265.57000000000698,153166111,1063737442,1200000000,NULL,1.2700000000000000177,3.8799999999999998934,7.2999999999999998223,3,'2019-11-14 13:02:24.757890'); 123 | INSERT INTO cryptocoins_cryptocurrency VALUES(46,'V Systems','v-systems','VSYS',46,0.080000000000000001665,9.0000000000000002281e-06,3629174.2200000002048,144922919,1851300222,3766158686,NULL,0.080000000000000001665,-3.9900000000000002131,3.2900000000000000355,3,'2019-11-14 13:02:24.785724'); 124 | INSERT INTO cryptocoins_cryptocurrency VALUES(47,'ThoreCoin','thorecoin','THR',47,1648.1700000000000728,0.18940419999999999478,149772.39999999999417,142873548,86686,100000,NULL,-0.29999999999999998889,-1.1000000000000000888,-5.8799999999999998934,1,'2019-11-14 13:02:24.798552'); 125 | INSERT INTO cryptocoins_cryptocurrency VALUES(48,'Bitcoin Gold','bitcoin-gold','BTG',48,8.1500000000000003552,0.00093639999999999999277,12842727.980000000447,142718340,17513924,17513924,21000000,-0.71999999999999997335,-4.1399999999999996802,-8,3,'2019-11-14 13:02:24.840082'); 126 | INSERT INTO cryptocoins_cryptocurrency VALUES(49,'OmiseGO','omisego','OMG',49,0.96999999999999997335,0.00011189999999999999588,83881616.629999995234,136556971,140245398,140245398,NULL,0.47999999999999998223,-0.51000000000000000888,-1.4199999999999999289,3,'2019-11-14 13:02:24.868002'); 127 | INSERT INTO cryptocoins_cryptocurrency VALUES(50,'Ravencoin','ravencoin','RVN',50,0.029999999999999998889,3.1999999999999998551e-06,8445356.3599999994038,133339550,4851965000,4851965000,21000000000,0.19000000000000000222,-2.5,-6.2000000000000001776,4,'2019-11-14 13:02:24.879178'); 128 | INSERT INTO cryptocoins_cryptocurrency VALUES(51,'ZB','zb','ZB',51,0.28999999999999998001,3.2900000000000000099e-05,315473871.18999999761,132779565,463288810,2100000000,NULL,-0.38000000000000000444,-1.3999999999999999111,-4.6100000000000003197,3,'2019-11-14 13:02:24.890745'); 129 | INSERT INTO cryptocoins_cryptocurrency VALUES(52,'Nano','nano','NANO',52,0.94999999999999995559,0.00010969999999999999662,4138321.4599999999629,127164423,133248297,133248297,133248297,-0.39000000000000001332,-6.8499999999999996447,-4.5400000000000000355,1,'2019-11-14 13:02:24.918306'); 130 | INSERT INTO cryptocoins_cryptocurrency VALUES(53,'ABBC Coin','abbc-coin','ABBC',53,0.23000000000000000999,2.5999999999999998398e-05,59032436.159999996422,126132363,556626634,1004488460,NULL,-0.20999999999999999222,-0.8000000000000000444,7.9000000000000003552,3,'2019-11-14 13:02:24.942528'); 131 | INSERT INTO cryptocoins_cryptocurrency VALUES(54,'Synthetix Network Token','synthetix-network-token','SNX',54,0.84999999999999997779,9.8200000000000001697e-05,186936.10999999998602,122766732,143729615,150480769,NULL,-0.010000000000000000208,4.7000000000000001776,2.7000000000000001776,1,'2019-11-14 13:02:24.974074'); 132 | INSERT INTO cryptocoins_cryptocurrency VALUES(55,'Algorand','algorand','ALGO',55,0.28000000000000002664,3.2599999999999999583e-05,114736828.79999999702,122625158,432649165,2963921008,NULL,-0.040000000000000000832,2.0299999999999998046,3.4100000000000001421,4,'2019-11-14 13:02:24.985183'); 133 | INSERT INTO cryptocoins_cryptocurrency VALUES(56,'Augur','augur','REP',56,11.099999999999999644,0.0012753000000000000446,7814385.4400000004097,122076512,11000000,11000000,NULL,-0.88000000000000000444,-4.0700000000000002842,-0.11000000000000000055,1,'2019-11-14 13:02:25.022021'); 134 | INSERT INTO cryptocoins_cryptocurrency VALUES(57,'Mixin','mixin','XIN',57,260.37000000000000453,0.029921300000000001367,39082401.679999999701,120656047,463399,1000000,1000000,-1.5200000000000000177,1.4799999999999999822,2.6499999999999999111,3,'2019-11-14 13:02:25.081648'); 135 | INSERT INTO cryptocoins_cryptocurrency VALUES(58,'Bytom','bytom','BTM',58,0.11000000000000000055,1.3099999999999999936e-05,22197277.050000000745,114276414,1002499275,1407000000,NULL,-0.13000000000000000444,-3.4700000000000001953,-13.419999999999999929,4,'2019-11-14 13:02:25.099970'); 136 | INSERT INTO cryptocoins_cryptocurrency VALUES(59,'Cryptonex','cryptonex','CNX',59,1.9799999999999999822,0.00022790000000000001012,2283026.7900000000371,110436157,55686329,107135054,210000000,0.17999999999999999333,-1.2199999999999999733,-2.6000000000000000888,1,'2019-11-14 13:02:25.140440'); 137 | INSERT INTO cryptocoins_cryptocurrency VALUES(60,'LUNA','luna','LUNA',60,0.36999999999999999555,4.2400000000000000622e-05,2003632.1000000000931,106096216,287765804,995859074,NULL,-1.4799999999999999822,1.1899999999999999467,-17.839999999999999857,2,'2019-11-14 13:02:25.151952'); 138 | INSERT INTO cryptocoins_cryptocurrency VALUES(61,'Dai','dai','DAI',61,1.0100000000000000088,0.00011610000000000000311,4815235.2199999997393,103449388,102409770,102409770,NULL,-0.19000000000000000222,0.46000000000000001998,0.30999999999999999777,1,'2019-11-14 13:02:25.190884'); 139 | INSERT INTO cryptocoins_cryptocurrency VALUES(62,'Komodo','komodo','KMD',62,0.85999999999999998667,9.940000000000000376e-05,7550156.0899999998507,101092365,116922530,116922530,200000000,-0.070000000000000006661,-9.3499999999999996447,22.75,2,'2019-11-14 13:02:25.200940'); 140 | INSERT INTO cryptocoins_cryptocurrency VALUES(63,'KuCoin Shares','kucoin-shares','KCS',63,1.1799999999999999378,0.0001355999999999999892,5129656.0300000002608,97177310,82363551,172363551,NULL,0.39000000000000001332,-1.5300000000000000266,-12.410000000000000142,4,'2019-11-14 13:02:25.225698'); 141 | INSERT INTO cryptocoins_cryptocurrency VALUES(64,'EDUCare','educare','EKT',64,0.10000000000000000555,1.1500000000000000009e-05,5192638.3099999995902,95184115,950000000,1000000000,NULL,-0.47999999999999998223,-3.3399999999999998578,-14.310000000000000497,4,'2019-11-14 13:02:25.237071'); 142 | INSERT INTO cryptocoins_cryptocurrency VALUES(65,'Silverway','silverway','SLV',65,0.94999999999999995559,0.00010880000000000000185,5661507.8200000002982,94689654,100000000,1000000000,NULL,-0.010000000000000000208,-4.2900000000000000355,-13.839999999999999857,2,'2019-11-14 13:02:25.251300'); 143 | INSERT INTO cryptocoins_cryptocurrency VALUES(66,'DxChain Token','dxchain-token','DX',66,0,1.9999999999999999094e-07,4055454.2799999997951,92842329,50000000000,100000000000,NULL,-0.52000000000000001776,-0.86999999999999999555,89.140000000000000571,4,'2019-11-14 13:02:25.301083'); 144 | INSERT INTO cryptocoins_cryptocurrency VALUES(67,'Lisk','lisk','LSK',67,0.75,8.6399999999999999474e-05,1393379.600000000093,91298510,121481801,136513952,NULL,-0.059999999999999997779,-0.4500000000000000111,-6.4900000000000002131,1,'2019-11-14 13:02:25.736950'); 145 | INSERT INTO cryptocoins_cryptocurrency VALUES(68,'Bitcoin Diamond','bitcoin-diamond','BCD',68,0.48999999999999999111,5.5800000000000001074e-05,3284890.4900000002234,90642781,186492898,189492898,210000000,-0.34000000000000002442,-2.7799999999999998046,-6.8200000000000002842,2,'2019-11-14 13:02:25.743931'); 146 | INSERT INTO cryptocoins_cryptocurrency VALUES(69,'BitTorrent','bittorrent','BTT',69,0,0,65965806.789999999106,90281562,212116500000,990000000000,NULL,-0.17000000000000001221,-3.1200000000000001065,-6.8799999999999998934,3,'2019-11-14 13:02:25.750744'); 147 | INSERT INTO cryptocoins_cryptocurrency VALUES(70,'DigiByte','digibyte','DGB',70,0.010000000000000000208,7.9999999999999996378e-07,1400440.4899999999906,89565280,12488985987,12488985987,21000000000,-0.9000000000000000222,0.11000000000000000055,1.1000000000000000888,1,'2019-11-14 13:02:25.757605'); 148 | INSERT INTO cryptocoins_cryptocurrency VALUES(71,'Siacoin','siacoin','SC',71,0,1.9999999999999999094e-07,3615775.5800000000744,86710362,41817047634,41817047634,NULL,-0.38000000000000000444,0.14999999999999999444,0.56000000000000005329,4,'2019-11-14 13:02:25.765313'); 149 | INSERT INTO cryptocoins_cryptocurrency VALUES(72,'HyperCash','hypercash','HC',72,1.8400000000000000799,0.00021149999999999999095,3307689.2200000002049,81757788,44429003,44429003,84000000,0.39000000000000001332,-3.0699999999999998401,-4.0700000000000002842,4,'2019-11-14 13:02:25.773496'); 150 | INSERT INTO cryptocoins_cryptocurrency VALUES(73,'Quant','quant','QNT',73,6.7099999999999999644,0.00077059999999999997423,20520954.629999998957,80955490,12072738,14612493,NULL,-0.61999999999999999555,1.5700000000000000621,-1.3200000000000000621,1,'2019-11-14 13:02:25.782875'); 151 | INSERT INTO cryptocoins_cryptocurrency VALUES(74,'ICON','icon','ICX',74,0.16000000000000000333,1.8400000000000000014e-05,9137681.9199999999255,80832786,504362262,800460000,NULL,0.040000000000000000832,-5.7000000000000001776,-10.679999999999999715,3,'2019-11-14 13:02:25.806574'); 152 | INSERT INTO cryptocoins_cryptocurrency VALUES(75,'Seele','seele','SEELE',75,0.11000000000000000055,1.3099999999999999936e-05,77237947.159999996425,79653469,696705193,1000000000,NULL,0.28000000000000002664,23.390000000000000569,39.59000000000000341,1,'2019-11-14 13:02:25.814538'); 153 | INSERT INTO cryptocoins_cryptocurrency VALUES(76,'Swipe','swipe','SXP',76,1.2900000000000000355,0.00014789999999999999002,29453183.19000000134,78662466,61135911,300000000,NULL,-0.25,-0.35999999999999998667,4.8700000000000001065,1,'2019-11-14 13:02:25.822818'); 154 | INSERT INTO cryptocoins_cryptocurrency VALUES(77,'Bytecoin','bytecoin-bcn','BCN',77,0,0,11965.600000000000363,78395555,184066828814,184066828814,184470000000,-0.2000000000000000111,12.400000000000000355,2.2400000000000002131,1,'2019-11-14 13:02:26.018491'); 155 | INSERT INTO cryptocoins_cryptocurrency VALUES(78,'GAPS','gaps','GAP',78,7.7999999999999998223,0.00089639999999999999628,1729080.6100000001024,77999820,10000000,100000000,NULL,-0.23999999999999999111,0.020000000000000000416,3.2099999999999999644,3,'2019-11-14 13:02:26.027013'); 156 | INSERT INTO cryptocoins_cryptocurrency VALUES(79,'Waves','waves','WAVES',79,0.77000000000000001776,8.8200000000000002573e-05,14264915.880000000819,77001246,100330282,100330282,NULL,-0.70999999999999996447,-1.8000000000000000444,-4.6799999999999997157,3,'2019-11-14 13:02:26.036235'); 157 | INSERT INTO cryptocoins_cryptocurrency VALUES(80,'Dimension Chain','dimension-chain','EON',80,0.30999999999999999777,3.5899999999999998481e-05,7730917.3799999998883,76545660,244783561,2000000000,NULL,-0.26000000000000000888,-0.070000000000000006661,-7,4,'2019-11-14 13:02:26.046741'); 158 | INSERT INTO cryptocoins_cryptocurrency VALUES(81,'IOST','iostoken','IOST',81,0.010000000000000000208,6.9999999999999996838e-07,31023218.870000001043,76069462,12013965609,21000000000,NULL,-0.54000000000000003552,-3.4900000000000002131,-3.3599999999999998756,4,'2019-11-14 13:02:26.086758'); 159 | INSERT INTO cryptocoins_cryptocurrency VALUES(82,'THETA','theta','THETA',82,0.089999999999999996669,1.0000000000000000817e-05,10991628.630000000819,75992799,870502690,1000000000,NULL,0.020000000000000000416,-3.0499999999999998223,-4.9000000000000003552,1,'2019-11-14 13:02:26.112105'); 160 | INSERT INTO cryptocoins_cryptocurrency VALUES(83,'Karatgold Coin','karatgold-coin','KBC',83,0.020000000000000000416,2.3000000000000000019e-06,2375784.5400000000373,75586801,3752557397,12000000000,NULL,-0.22000000000000000111,-0.81000000000000005329,-2.4799999999999999822,3,'2019-11-14 13:02:26.131063'); 161 | INSERT INTO cryptocoins_cryptocurrency VALUES(84,'FTX Token','ftx-token','FTT',84,1.4199999999999999289,0.00016279999999999999983,3293430.1099999998695,74555153,52631546,348503882,NULL,-0.040000000000000000832,0.16000000000000000333,5.2000000000000001776,2,'2019-11-14 13:02:26.138960'); 162 | INSERT INTO cryptocoins_cryptocurrency VALUES(85,'BitShares','bitshares','BTS',85,0.029999999999999998889,3.0000000000000000758e-06,1760298.0300000000279,72779976,2747910000,2747910000,3600570502,-0.4500000000000000111,-1.5400000000000000355,-9.9600000000000008526,1,'2019-11-14 13:02:26.147428'); 163 | INSERT INTO cryptocoins_cryptocurrency VALUES(86,'Bitbook Gambling','bitbook-gambling','BXK',86,0.2000000000000000111,2.2600000000000000459e-05,579133.58999999996739,72330126,368387491,741456054,NULL,-1.8400000000000000799,-1.1299999999999998934,-3.3199999999999998401,1,'2019-11-14 13:02:26.156924'); 164 | INSERT INTO cryptocoins_cryptocurrency VALUES(87,'MonaCoin','monacoin','MONA',87,1.0700000000000000621,0.00012310000000000001062,705734.81999999994876,70397506,65729675,65729675,NULL,-0.17000000000000001221,-1.2800000000000000266,-2.5600000000000000532,4,'2019-11-14 13:02:26.189280'); 165 | INSERT INTO cryptocoins_cryptocurrency VALUES(88,'Aeternity','aeternity','AE',88,0.23000000000000000999,2.6800000000000000904e-05,37028297.880000002682,67889191,290856882,336677825,NULL,-0.64000000000000001332,-2.2900000000000000355,-2.5200000000000000177,4,'2019-11-14 13:02:26.210872'); 166 | INSERT INTO cryptocoins_cryptocurrency VALUES(89,'Beldex','beldex','BDX',89,0.070000000000000006661,7.9000000000000005955e-06,664850.31000000005588,67092186,980222595,1400222610,NULL,0.020000000000000000416,-0.14999999999999999444,-2.9900000000000002131,4,'2019-11-14 13:02:26.246353'); 167 | INSERT INTO cryptocoins_cryptocurrency VALUES(90,'MCO','crypto-com','MCO',90,4.2400000000000002131,0.00048730000000000002697,12062152.390000000595,66969404,15793831,31587682,NULL,-0.059999999999999997779,-3.9700000000000001953,-2.1600000000000001421,3,'2019-11-14 13:02:26.282357'); 168 | INSERT INTO cryptocoins_cryptocurrency VALUES(91,'OKB','okb','OKB',91,3.2999999999999998223,0.0003793000000000000039,101318832.84000000357,66007931,20000000,300000000,NULL,0.30999999999999999777,-0.070000000000000006661,-0.6500000000000000222,2,'2019-11-14 13:02:26.291955'); 169 | INSERT INTO cryptocoins_cryptocurrency VALUES(92,'Verge','verge','XVG',92,0,3.9999999999999998188e-07,2094696.3400000000838,62126520,16050141269,16050141269,16555000000,1.2199999999999999733,-1.4899999999999999911,-2.2400000000000002131,4,'2019-11-14 13:02:26.301721'); 170 | INSERT INTO cryptocoins_cryptocurrency VALUES(93,'Nexo','nexo','NEXO',93,0.11000000000000000055,1.2300000000000000819e-05,10958682.47000000067,60008509,560000011,1000000000,NULL,-0.16000000000000000333,1.1200000000000001065,5.1900000000000003907,1,'2019-11-14 13:02:26.310631'); 171 | INSERT INTO cryptocoins_cryptocurrency VALUES(94,'MaidSafeCoin','maidsafecoin','MAID',94,0.13000000000000000444,1.5099999999999999423e-05,295854.17999999999301,59438371,452552412,452552412,NULL,-0.27000000000000001776,-0.76000000000000000888,-2.0400000000000000355,4,'2019-11-14 13:02:26.320091'); 172 | INSERT INTO cryptocoins_cryptocurrency VALUES(95,'Aurora','aurora','AOA',95,0.010000000000000000208,9.9999999999999995472e-07,2805817.7599999997765,58804011,6542330148,10000000000,NULL,-0.22000000000000000111,-26.899999999999998578,9.4900000000000002131,3,'2019-11-14 13:02:26.330568'); 173 | INSERT INTO cryptocoins_cryptocurrency VALUES(96,'iExec RLC','rlc','RLC',96,0.72999999999999998223,8.4200000000000000208e-05,912359.84999999997675,58690317,80070793,86999785,NULL,1.75,-2.6499999999999999111,10.640000000000000568,1,'2019-11-14 13:02:26.339720'); 174 | INSERT INTO cryptocoins_cryptocurrency VALUES(97,'BitMax Token','bitmax-token','BTMX',97,0.070000000000000006661,7.9999999999999996378e-06,3352881.2900000000373,54953077,787683608,787683608,NULL,-0.71999999999999997335,0.82999999999999996003,1.1799999999999999378,4,'2019-11-14 13:02:26.349654'); 175 | INSERT INTO cryptocoins_cryptocurrency VALUES(98,'Flexacoin','flexacoin','FXC',98,0,2.9999999999999998642e-07,21826.639999999999418,54053204,21223945749,21223945749,100000000000,0.010000000000000000208,2.5299999999999998046,-0.39000000000000001332,1,'2019-11-14 13:02:26.359969'); 176 | INSERT INTO cryptocoins_cryptocurrency VALUES(99,'Chiliz','chiliz','CHZ',99,0.010000000000000000208,1.5999999999999999275e-06,11396114.279999999329,53955717,3762769182,8888888888,NULL,0.83999999999999996891,-3.4100000000000001421,5.4400000000000003907,2,'2019-11-14 13:02:26.376334'); 177 | INSERT INTO cryptocoins_cryptocurrency VALUES(100,'Ardor','ardor','ARDR',100,0.050000000000000002775,6.1000000000000000411e-06,2348665.9799999999812,53205799,998999495,998999495,998999495,-0.34000000000000002442,-4.2199999999999997513,-3.5600000000000000532,1,'2019-11-14 13:02:26.387078'); 178 | CREATE TABLE IF NOT EXISTS "django_session" ("session_key" varchar(40) NOT NULL PRIMARY KEY, "session_data" text NOT NULL, "expire_date" datetime NOT NULL); 179 | DELETE FROM sqlite_sequence; 180 | INSERT INTO sqlite_sequence VALUES('django_migrations',20); 181 | INSERT INTO sqlite_sequence VALUES('django_admin_log',0); 182 | INSERT INTO sqlite_sequence VALUES('django_content_type',8); 183 | INSERT INTO sqlite_sequence VALUES('auth_permission',32); 184 | INSERT INTO sqlite_sequence VALUES('auth_user',0); 185 | INSERT INTO sqlite_sequence VALUES('auth_group',0); 186 | INSERT INTO sqlite_sequence VALUES('cryptocoins_cryptocurrency',100); 187 | INSERT INTO sqlite_sequence VALUES('cryptocoins_exchange',4); 188 | CREATE UNIQUE INDEX "auth_group_permissions_group_id_permission_id_0cd325b0_uniq" ON "auth_group_permissions" ("group_id", "permission_id"); 189 | CREATE INDEX "auth_group_permissions_group_id_b120cbf9" ON "auth_group_permissions" ("group_id"); 190 | CREATE INDEX "auth_group_permissions_permission_id_84c5c92e" ON "auth_group_permissions" ("permission_id"); 191 | CREATE UNIQUE INDEX "auth_user_groups_user_id_group_id_94350c0c_uniq" ON "auth_user_groups" ("user_id", "group_id"); 192 | CREATE INDEX "auth_user_groups_user_id_6a12ed8b" ON "auth_user_groups" ("user_id"); 193 | CREATE INDEX "auth_user_groups_group_id_97559544" ON "auth_user_groups" ("group_id"); 194 | CREATE UNIQUE INDEX "auth_user_user_permissions_user_id_permission_id_14a6b632_uniq" ON "auth_user_user_permissions" ("user_id", "permission_id"); 195 | CREATE INDEX "auth_user_user_permissions_user_id_a95ead1b" ON "auth_user_user_permissions" ("user_id"); 196 | CREATE INDEX "auth_user_user_permissions_permission_id_1fbb5f2c" ON "auth_user_user_permissions" ("permission_id"); 197 | CREATE INDEX "django_admin_log_content_type_id_c4bce8eb" ON "django_admin_log" ("content_type_id"); 198 | CREATE INDEX "django_admin_log_user_id_c564eba6" ON "django_admin_log" ("user_id"); 199 | CREATE UNIQUE INDEX "django_content_type_app_label_model_76bd3d3b_uniq" ON "django_content_type" ("app_label", "model"); 200 | CREATE UNIQUE INDEX "auth_permission_content_type_id_codename_01ab375a_uniq" ON "auth_permission" ("content_type_id", "codename"); 201 | CREATE INDEX "auth_permission_content_type_id_2f476e4b" ON "auth_permission" ("content_type_id"); 202 | CREATE INDEX "cryptocoins_cryptocurrency_exchange_id_bd2ef076" ON "cryptocoins_cryptocurrency" ("exchange_id"); 203 | CREATE INDEX "django_session_expire_date_a5c62663" ON "django_session" ("expire_date"); 204 | COMMIT; 205 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import sqlite3 4 | 5 | # create a new connection to a db in memory 6 | conn = sqlite3.connect(':memory:') 7 | 8 | # create a cursor 9 | c = conn.cursor() 10 | 11 | # restore the given cryptos.sql dump 12 | c.executescript(open('cryptos.sql', 'r').read()) 13 | 14 | # your code goes here 15 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/solutions/solution_cryptos.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import sqlite3 4 | 5 | # create a new connection to a db in memory 6 | conn = sqlite3.connect(':memory:') 7 | 8 | # create a cursor 9 | c = conn.cursor() 10 | 11 | # restore the given cryptos.sql dump 12 | c.executescript(open('cryptos.sql', 'r').read()) 13 | 14 | crypto_df = pd.read_sql('''SELECT cryptocoins_cryptocurrency.name AS coin_name, cryptocoins_exchange.name AS exchange, symbol, price_usd, percent_change_7d 15 | FROM cryptocoins_cryptocurrency 16 | JOIN cryptocoins_exchange 17 | ON cryptocoins_cryptocurrency.exchange_id = cryptocoins_exchange.id''', conn) 18 | 19 | weekly_change_df = crypto_df.sort_values('percent_change_7d', ascending=False) 20 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/tests/test_cryptos_1.py: -------------------------------------------------------------------------------- 1 | def test_cryptos_1(): 2 | assert crypto_df.shape == (100, 5) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/tests/test_cryptos_2.py: -------------------------------------------------------------------------------- 1 | def test_cryptos_2(): 2 | assert crypto_df.loc[12, 'symbol'] == 'LINK' -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/tests/test_weekly_change_1.py: -------------------------------------------------------------------------------- 1 | def test_weekly_change_1(): 2 | assert weekly_change_df.iloc[0]['coin_name'] == 'DxChain Token' 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-14-crypto-currency-database/tests/test_weekly_change_2.py: -------------------------------------------------------------------------------- 1 | def test_weekly_change_2(): 2 | assert weekly_change_df.iloc[4]['price_usd'] == 0.01 -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-15-fetching-data-from-a-rest-api/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "3ed455b1-62bb-4ebf-b36d-c0ca4df66bee" 3 | name = "Fetching data from a REST API" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/fetching-data-from-a-rest-api-f118dc8f" 5 | youtube_id = "" 6 | jwplayer_media_id = "qdwQee93" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-15-fetching-data-from-a-rest-api/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-15-fetching-data-from-a-rest-api/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "32e2aa63-eba8-4f48-93c9-9ad3334211c7" 3 | name = "Discover StarWars people" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/README.md: -------------------------------------------------------------------------------- 1 | # Discover StarWars people 2 | 3 | Your task: 4 | 5 | - Using the _requests_ library make a GET request to https://swapi.co/api/people/?format=json to get the `people` of StarWars universe. 6 | - Store the JSON response into a `starwars_people_df` DataFrame variable. 7 | - Filter blue-eyed characters on `blue_eyed_people_df`. 8 | 9 | > SWAPI is a StarWars REST API with information about `people`, `films`, `starships` and `planets` within the StarWars universe. -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import requests 4 | 5 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/solutions/solution_swapi.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import requests 4 | 5 | req = requests.get('https://swapi.co/api/people/?format=json') 6 | 7 | swapi_dict = req.json() 8 | 9 | starwars_people_df = pd.DataFrame.from_dict(swapi_dict['results']) 10 | 11 | blue_eyed_people_df = starwars_people_df.loc[starwars_people_df['eye_color'] == 'blue'] 12 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/tests/test_blue_eyed_people_1.py: -------------------------------------------------------------------------------- 1 | def test_blue_eyed_people_1(): 2 | assert blue_eyed_people_df.shape == (3,16) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/tests/test_blue_eyed_people_2.py: -------------------------------------------------------------------------------- 1 | def test_blue_eyed_people_2(): 2 | assert blue_eyed_people_df.loc[blue_eyed_people_df['gender'] == 'male']['gender'].count() 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/tests/test_starwars_people_1.py: -------------------------------------------------------------------------------- 1 | def test_starwars_people_1(): 2 | assert starwars_people_df.shape == (10,16) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-16-discover-starwars-people/tests/test_starwars_people_2.py: -------------------------------------------------------------------------------- 1 | def test_starwars_people_2(): 2 | assert starwars_people_df.iloc[1]['height'] == '167' 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-17-reading-html-tables/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "76a2e191-d4c6-4a57-9e68-50f618703cdf" 3 | name = "Reading HTML tables" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/reading-html-tables-eb9cca73" 5 | youtube_id = "" 6 | jwplayer_media_id = "NWmHjvSN" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-17-reading-html-tables/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-17-reading-html-tables/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "7693d0c4-5e8f-47c1-a74c-ac84f6d0268e" 3 | name = "Get FIFA players from the web" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/README.md: -------------------------------------------------------------------------------- 1 | # Get FIFA players from the web 2 | 3 | Your task: 4 | 5 | - Read and store in a `fifa_df` DataFrame the HTML table found in the `fifa_players.html` file that contains the top 30 FIFA players as of Oct. 30, 2019. The `fifa_players.html` file is a dump generated from this URL: https://www.fifaindex.com/players/top/fifa20_363/ 6 | - Remove the first two columns and the last one from the resulting `fifa_df` DataFrame, as they are `Unnamed` and filled with `NaN` objects. 7 | - Create a `most_hits_player` variable containing the player with the most amount of `Hits`. 8 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import requests 4 | 5 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/solutions/solution_fifa.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | import requests 4 | 5 | dfs = pd.read_html('fifa_players.html', encoding='utf-8') 6 | 7 | fifa_df = dfs[0] 8 | 9 | fifa_df = fifa_df.iloc[:, 2:-1] 10 | 11 | most_hits_player = fifa_df.sort_values('Hits', ascending=False).head(1) 12 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/tests/test_fifa_1.py: -------------------------------------------------------------------------------- 1 | def test_fifa_1(): 2 | assert fifa_df.shape == (30, 5) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/tests/test_fifa_2.py: -------------------------------------------------------------------------------- 1 | def test_fifa_2(): 2 | assert fifa_df.loc[:,'Age'].sum() == 746 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-18-get-fifa-players-from-the-web/tests/test_most_hits.py: -------------------------------------------------------------------------------- 1 | def test_most_hits(): 2 | assert most_hits_player['Name'][0] == 'Erling Braut Håland' 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "bbdb6e5c-4087-4e73-85b0-7547492a98d7" 3 | name = "Complementary file types and IO tools" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/complementary-file-types-and-io-tools-7a37030e" 5 | youtube_id = "" 6 | jwplayer_media_id = "UlCakGSh" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/files/airline.sas7bdat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/files/airline.sas7bdat -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/files/broiler.dta: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-19-complementary-file-types-and-io-tools/files/broiler.dta -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "42e61e08-4bf2-4749-b7d8-8eb79b2bd7c0" 3 | name = "Load movies dataset" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/README.md: -------------------------------------------------------------------------------- 1 | # Load movies dataset 2 | 3 | Read and store in a `movies` DataFrame the data within the `movies.csv` file. 4 | 5 | Take a look at the file before you read it into a DataFrame and see what will be necessary to parse it correctly. 6 | 7 | - Use the appropriate separator. 8 | - The given data doesn't have a defined header. Use the column names given in the `column_names` variable. 9 | - Skip the first 3 rows. 10 | 11 | > This CSV is altered for this course and originally from Kaggle, https://www.kaggle.com/carolzhangdc/imdb-5000-movie-dataset 12 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/files/movies.csv: -------------------------------------------------------------------------------- 1 | Color|James Cameron|723.0|178.0|760505847.0|Avatar |3054.0|USA|PG-13|237,000,000.0|2009.0|7.9|Action 2 | Color|Gore Verbinski|302.0|169.0|309404152.0|Pirates of the Caribbean: At World's End |1238.0|USA|PG-13|300,000,000.0|2007.0|7.1|Action 3 | Color|Sam Mendes|602.0|148.0|200074175.0|Spectre |994.0|UK|PG-13|245,000,000.0|2015.0|6.8|Action 4 | Color|Christopher Nolan|813.0|164.0|448130642.0|The Dark Knight Rises |2701.0|USA|PG-13|250,000,000.0|2012.0|8.5|Action 5 | ?|Doug Walker|?|?|?|Star Wars: Episode VII - The Force Awakens  |?|?|?|?|?|7.1|Documentary 6 | Color|Andrew Stanton|462.0|132.0|73058679.0|John Carter |738.0|USA|PG-13|263,700,000.0|2012.0|6.6|Action 7 | Color|Sam Raimi|392.0|156.0|336530303.0|Spider-Man 3 |1902.0|USA|PG-13|258,000,000.0|2007.0|6.2|Action 8 | Color|Nathan Greno|324.0|100.0|200807262.0|Tangled |387.0|USA|PG|260,000,000.0|2010.0|7.8|Adventure 9 | Color|Joss Whedon|635.0|141.0|458991599.0|Avengers: Age of Ultron |1117.0|USA|PG-13|250,000,000.0|2015.0|7.5|Action 10 | Color|David Yates|375.0|153.0|301956980.0|Harry Potter and the Half-Blood Prince |973.0|UK|PG|250,000,000.0|2009.0|7.5|Adventure 11 | Color|Zack Snyder|673.0|183.0|330249062.0|Batman v Superman: Dawn of Justice |3018.0|USA|PG-13|250,000,000.0|2016.0|6.9|Action 12 | Color|Bryan Singer|434.0|169.0|200069408.0|Superman Returns |2367.0|USA|PG-13|209,000,000.0|2006.0|6.1|Action 13 | Color|Marc Forster|403.0|106.0|168368427.0|Quantum of Solace |1243.0|UK|PG-13|200,000,000.0|2008.0|6.7|Action 14 | Color|Gore Verbinski|313.0|151.0|423032628.0|Pirates of the Caribbean: Dead Man's Chest |1832.0|USA|PG-13|225,000,000.0|2006.0|7.3|Action 15 | Color|Gore Verbinski|450.0|150.0|89289910.0|The Lone Ranger |711.0|USA|PG-13|215,000,000.0|2013.0|6.5|Action 16 | Color|Zack Snyder|733.0|143.0|291021565.0|Man of Steel |2536.0|USA|PG-13|225,000,000.0|2013.0|7.2|Action 17 | Color|Andrew Adamson|258.0|150.0|141614023.0|The Chronicles of Narnia: Prince Caspian |438.0|USA|PG|225,000,000.0|2008.0|6.6|Action 18 | Color|Joss Whedon|703.0|173.0|623279547.0|The Avengers |1722.0|USA|PG-13|220,000,000.0|2012.0|8.1|Action 19 | Color|Rob Marshall|448.0|136.0|241063875.0|Pirates of the Caribbean: On Stranger Tides |484.0|USA|PG-13|250,000,000.0|2011.0|6.7|Action 20 | Color|Barry Sonnenfeld|451.0|106.0|179020854.0|Men in Black 3 |341.0|USA|PG-13|225,000,000.0|2012.0|6.8|Action 21 | Color|Peter Jackson|422.0|164.0|255108370.0|The Hobbit: The Battle of the Five Armies |802.0|New Zealand|PG-13|250,000,000.0|2014.0|7.5|Adventure 22 | Color|Marc Webb|599.0|153.0|262030663.0|The Amazing Spider-Man |1225.0|USA|PG-13|230,000,000.0|2012.0|7.0|Action 23 | Color|Ridley Scott|343.0|156.0|105219735.0|Robin Hood |546.0|USA|PG-13|200,000,000.0|2010.0|6.7|Action 24 | Color|Peter Jackson|509.0|186.0|258355354.0|The Hobbit: The Desolation of Smaug |951.0|USA|PG-13|225,000,000.0|2013.0|7.9|Adventure 25 | Color|Chris Weitz|251.0|113.0|70083519.0|The Golden Compass |666.0|USA|PG-13|180,000,000.0|2007.0|6.1|Adventure 26 | Color|Peter Jackson|446.0|201.0|218051260.0|King Kong |2618.0|New Zealand|PG-13|207,000,000.0|2005.0|7.2|Action 27 | Color|James Cameron|315.0|194.0|658672302.0|Titanic |2528.0|USA|PG-13|200,000,000.0|1997.0|7.7|Drama 28 | Color|Anthony Russo|516.0|147.0|407197282.0|Captain America: Civil War |1022.0|USA|PG-13|250,000,000.0|2016.0|8.2|Action 29 | Color|Peter Berg|377.0|131.0|65173160.0|Battleship |751.0|USA|PG-13|209,000,000.0|2012.0|5.9|Action 30 | Color|Colin Trevorrow|644.0|124.0|652177271.0|Jurassic World |1290.0|USA|PG-13|150,000,000.0|2015.0|7.0|Action 31 | Color|Sam Mendes|750.0|143.0|304360277.0|Skyfall |1498.0|UK|PG-13|200,000,000.0|2012.0|7.8|Action 32 | Color|Sam Raimi|300.0|135.0|373377893.0|Spider-Man 2 |1303.0|USA|PG-13|200,000,000.0|2004.0|7.3|Action 33 | Color|Shane Black|608.0|195.0|408992272.0|Iron Man 3 |1187.0|USA|PG-13|200,000,000.0|2013.0|7.2|Action 34 | Color|Tim Burton|451.0|108.0|334185206.0|Alice in Wonderland |736.0|USA|PG|200,000,000.0|2010.0|6.5|Adventure 35 | Color|Brett Ratner|334.0|104.0|234360014.0|X-Men: The Last Stand |1912.0|Canada|PG-13|210,000,000.0|2006.0|6.8|Action 36 | Color|Dan Scanlon|376.0|104.0|268488329.0|Monsters University |265.0|USA|G|200,000,000.0|2013.0|7.3|Adventure 37 | Color|Michael Bay|366.0|150.0|402076689.0|Transformers: Revenge of the Fallen |1439.0|USA|PG-13|200,000,000.0|2009.0|6.0|Action 38 | Color|Michael Bay|378.0|165.0|245428137.0|Transformers: Age of Extinction |918.0|USA|PG-13|210,000,000.0|2014.0|5.7|Action 39 | Color|Sam Raimi|525.0|130.0|234903076.0|Oz the Great and Powerful |511.0|USA|PG|215,000,000.0|2013.0|6.4|Adventure 40 | Color|Marc Webb|495.0|142.0|202853933.0|The Amazing Spider-Man 2 |1067.0|USA|PG-13|200,000,000.0|2014.0|6.7|Action 41 | Color|Joseph Kosinski|469.0|125.0|172051787.0|TRON: Legacy |665.0|USA|PG|170,000,000.0|2010.0|6.8|Action 42 | Color|John Lasseter|304.0|106.0|191450875.0|Cars 2 |283.0|USA|G|200,000,000.0|2011.0|6.3|Adventure 43 | Color|Martin Campbell|436.0|123.0|116593191.0|Green Lantern |550.0|USA|PG-13|200,000,000.0|2011.0|5.6|Action 44 | Color|Lee Unkrich|453.0|103.0|414984497.0|Toy Story 3 |733.0|USA|G|200,000,000.0|2010.0|8.3|Adventure 45 | Color|McG|422.0|118.0|125320003.0|Terminator Salvation |974.0|USA|PG-13|200,000,000.0|2009.0|6.6|Action 46 | Color|James Wan|424.0|140.0|350034110.0|Furious 7 |657.0|USA|PG-13|190,000,000.0|2015.0|7.2|Action 47 | Color|Marc Forster|654.0|123.0|202351611.0|World War Z |995.0|USA|PG-13|190,000,000.0|2013.0|7.0|Action 48 | Color|Bryan Singer|539.0|149.0|233914986.0|X-Men: Days of Future Past |752.0|USA|PG-13|200,000,000.0|2014.0|8.0|Action 49 | Color|J.J. Abrams|590.0|132.0|228756232.0|Star Trek Into Darkness |1171.0|USA|PG-13|190,000,000.0|2013.0|7.8|Action 50 | Color|Bryan Singer|338.0|114.0|65171860.0|Jack the Giant Slayer |205.0|USA|PG-13|195,000,000.0|2013.0|6.3|Adventure 51 | Color|Baz Luhrmann|490.0|143.0|144812796.0|The Great Gatsby |753.0|Australia|PG-13|105,000,000.0|2013.0|7.3|Drama 52 | Color|Mike Newell|306.0|116.0|90755643.0|Prince of Persia: The Sands of Time |453.0|USA|PG-13|200,000,000.0|2010.0|6.6|Action 53 | Color|Guillermo del Toro|575.0|131.0|101785482.0|Pacific Rim |1106.0|USA|PG-13|190,000,000.0|2013.0|7.0|Action 54 | Color|Michael Bay|428.0|154.0|352358779.0|Transformers: Dark of the Moon |899.0|USA|PG-13|195,000,000.0|2011.0|6.3|Action 55 | Color|Steven Spielberg|470.0|122.0|317011114.0|Indiana Jones and the Kingdom of the Crystal Skull |2054.0|USA|PG-13|185,000,000.0|2008.0|6.2|Action 56 | Color|Peter Sohn|298.0|93.0|123070338.0|The Good Dinosaur |345.0|USA|PG|?|2015.0|6.8|Adventure 57 | Color|Mark Andrews|488.0|93.0|237282182.0|Brave |428.0|USA|PG|185,000,000.0|2012.0|7.2|Adventure 58 | Color|Justin Lin|322.0|122.0|130468626.0|Star Trek Beyond |432.0|USA|PG-13|185,000,000.0|2016.0|7.5|Action 59 | Color|Andrew Stanton|421.0|98.0|223806889.0|WALL·E |1043.0|USA|G|180,000,000.0|2008.0|8.4|Adventure 60 | Color|Brett Ratner|162.0|91.0|140080850.0|Rush Hour 3 |221.0|USA|PG-13|140,000,000.0|2007.0|6.2|Action 61 | Color|Roland Emmerich|367.0|158.0|166112167.0|2012 |1055.0|USA|PG-13|200,000,000.0|2009.0|5.8|Action 62 | Color|Robert Zemeckis|240.0|96.0|137850096.0|A Christmas Carol |249.0|USA|PG|200,000,000.0|2009.0|6.8|Animation 63 | Color|Lana Wachowski|384.0|127.0|47375327.0|Jupiter Ascending |720.0|USA|PG-13|176,000,000.0|2015.0|5.4|Action 64 | Color|David Yates|248.0|110.0|124051759.0|The Legend of Tarzan |239.0|USA|PG-13|180,000,000.0|2016.0|6.6|Action 65 | Color|Andrew Adamson|284.0|150.0|291709845.0|The Chronicles of Narnia: The Lion, the Witch and the Wardrobe |1463.0|USA|PG|180,000,000.0|2005.0|6.9|Adventure 66 | Color|Bryan Singer|396.0|144.0|154985087.0|X-Men: Apocalypse |622.0|USA|PG-13|178,000,000.0|2016.0|7.3|Action 67 | Color|Christopher Nolan|645.0|152.0|533316061.0|The Dark Knight |4667.0|USA|PG-13|185,000,000.0|2008.0|9.0|Action 68 | Color|Pete Docter|408.0|96.0|292979556.0|Up |704.0|USA|PG|175,000,000.0|2009.0|8.3|Adventure 69 | Color|Rob Letterman|219.0|94.0|198332128.0|Monsters vs. Aliens |187.0|USA|PG|175,000,000.0|2009.0|6.5|Action 70 | Color|Jon Favreau|486.0|126.0|318298180.0|Iron Man |1055.0|USA|PG-13|140,000,000.0|2008.0|7.9|Action 71 | Color|Martin Scorsese|682.0|126.0|73820094.0|Hugo |678.0|USA|PG|170,000,000.0|2011.0|7.5|Adventure 72 | Color|Barry Sonnenfeld|85.0|106.0|113745408.0|Wild Wild West |648.0|USA|PG-13|170,000,000.0|1999.0|4.8|Action 73 | Color|Rob Cohen|264.0|112.0|102176165.0|The Mummy: Tomb of the Dragon Emperor |501.0|USA|PG-13|145,000,000.0|2008.0|5.2|Action 74 | Color|David Ayer|418.0|123.0|161087183.0|Suicide Squad |971.0|USA|PG-13|175,000,000.0|2016.0|6.9|Action 75 | Color|Tom Shadyac|186.0|96.0|100289690.0|Evan Almighty |257.0|USA|PG|175,000,000.0|2007.0|5.4|Comedy 76 | Color|Doug Liman|585.0|113.0|100189501.0|Edge of Tomorrow |741.0|USA|PG-13|178,000,000.0|2014.0|7.9|Action 77 | Color|Kevin Reynolds|91.0|176.0|88246220.0|Waterworld |309.0|USA|PG-13|175,000,000.0|1995.0|6.1|Action 78 | Color|Stephen Sommers|250.0|118.0|150167630.0|G.I. Joe: The Rise of Cobra |534.0|USA|PG-13|175,000,000.0|2009.0|5.8|Action 79 | Color|Pete Docter|536.0|95.0|356454367.0|Inside Out |773.0|USA|PG|175,000,000.0|2015.0|8.3|Adventure 80 | Color|Jon Favreau|370.0|106.0|362645141.0|The Jungle Book |398.0|UK|PG|175,000,000.0|2016.0|7.8|Adventure 81 | Color|Jon Favreau|453.0|124.0|312057433.0|Iron Man 2 |723.0|USA|PG-13|200,000,000.0|2010.0|7.0|Action 82 | Color|Rupert Sanders|416.0|132.0|155111815.0|Snow White and the Huntsman |710.0|USA|PG-13|170,000,000.0|2012.0|6.1|Action 83 | Color|Robert Stromberg|401.0|97.0|241407328.0|Maleficent |634.0|USA|PG|180,000,000.0|2014.0|7.0|Action 84 | Color|Matt Reeves|521.0|130.0|208543795.0|Dawn of the Planet of the Apes |620.0|USA|PG-13|170,000,000.0|2014.0|7.6|Action 85 | Color|Roland Joffé|10.0|109.0|?|The Lovers |15.0|Belgium|R|?|2015.0|4.5|Action 86 | Color|Carl Rinsch|218.0|128.0|38297305.0|47 Ronin |324.0|USA|PG-13|175,000,000.0|2013.0|6.3|Action 87 | Color|Anthony Russo|576.0|136.0|259746958.0|Captain America: The Winter Soldier |742.0|USA|PG-13|170,000,000.0|2014.0|7.8|Action 88 | Color|Mike Mitchell|226.0|93.0|238371987.0|Shrek Forever After |173.0|USA|PG|165,000,000.0|2010.0|6.4|Adventure 89 | Color|Brad Bird|443.0|130.0|93417865.0|Tomorrowland |497.0|USA|PG|190,000,000.0|2015.0|6.5|Action 90 | Color|Don Hall|384.0|102.0|222487711.0|Big Hero 6 |433.0|USA|PG|165,000,000.0|2014.0|7.9|Action 91 | Color|Rich Moore|377.0|101.0|189412677.0|Wreck-It Ralph |345.0|USA|PG|165,000,000.0|2012.0|7.8|Adventure 92 | Color|Robert Zemeckis|188.0|100.0|665426.0|The Polar Express |444.0|USA|G|165,000,000.0|2004.0|6.6|Adventure 93 | Color|Roland Emmerich|286.0|120.0|102315545.0|Independence Day: Resurgence |520.0|USA|PG-13|165,000,000.0|2016.0|5.5|Action 94 | Color|Dean DeBlois|288.0|98.0|217387997.0|How to Train Your Dragon |492.0|USA|PG|165,000,000.0|2010.0|8.2|Adventure 95 | Color|Jonathan Mostow|280.0|109.0|150350192.0|Terminator 3: Rise of the Machines |1676.0|USA|R|200,000,000.0|2003.0|6.4|Action 96 | Color|James Gunn|653.0|121.0|333130696.0|Guardians of the Galaxy |1097.0|USA|PG-13|170,000,000.0|2014.0|8.1|Action 97 | Color|Christopher Nolan|712.0|169.0|187991439.0|Interstellar |2725.0|USA|PG-13|165,000,000.0|2014.0|8.6|Adventure 98 | Color|Christopher Nolan|642.0|148.0|292568851.0|Inception |2803.0|USA|PG-13|160,000,000.0|2010.0|8.8|Action 99 | Color|Hideaki Anno|1.0|120.0|?|Godzilla Resurgence |13.0|Japan|?|?|2016.0|8.2|Action 100 | Color|Peter Jackson|645.0|182.0|303001229.0|The Hobbit: An Unexpected Journey |1367.0|USA|PG-13|180,000,000.0|2012.0|7.9|Adventure 101 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | column_names = ['color', 'director_name', 'num_critic_for_reviews', 'duration', 5 | 'gross', 'movie_title', 'num_user_for_reviews', 'country', 6 | 'cotent_rating', 'budget', 'title_year', 'imdb_score', 'genre'] 7 | 8 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/solutions/solution_read_csv.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | column_names = ['color', 'director_name', 'num_critic_for_reviews', 'duration', 5 | 'gross', 'movie_title', 'num_user_for_reviews', 'country', 6 | 'cotent_rating', 'budget', 'title_year', 'imdb_score', 'genre'] 7 | 8 | movies = pd.read_csv('movies.csv', 9 | sep='|', 10 | header=None, 11 | names=column_names, 12 | skiprows=3) 13 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/tests/test_score.py: -------------------------------------------------------------------------------- 1 | def test_score(): 2 | assert movies.loc[:, 'imdb_score'].max() == 9 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-2-load-movies-dataset/tests/test_shape.py: -------------------------------------------------------------------------------- 1 | def test_shape(): 2 | assert movies.shape == (97, 13) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "701f3965-060b-472d-b777-aa1109dca549" 3 | name = "Advanced parsing on movies dataset" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/README.md: -------------------------------------------------------------------------------- 1 | # Advanced parsing on movies dataset 2 | 3 | Read and store in a `movies` DataFrame the data within the `movies.csv` file. 4 | 5 | This assignment will require a few extra steps. We will be using the same `movies.csv` as the previous exercise. 6 | 7 | - Use the appropriate separator. 8 | - The given data doesn't have a defined header. Use the column names given in the `column_names` variable. 9 | - Missing values are encoded as `?` characters. Parse those values as `NaN` objects. 10 | - The `budget` column has commas separating the thousands, make sure the column is of float data type. 11 | - The index of the DataFrame should be represented by the `movie_title` column. 12 | 13 | > This CSV is altered for this course and originally from Kaggle, https://www.kaggle.com/carolzhangdc/imdb-5000-movie-dataset 14 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/files/movies.csv: -------------------------------------------------------------------------------- 1 | Color|James Cameron|723.0|178.0|760505847.0|Avatar |3054.0|USA|PG-13|237,000,000.0|2009.0|7.9|Action 2 | Color|Gore Verbinski|302.0|169.0|309404152.0|Pirates of the Caribbean: At World's End |1238.0|USA|PG-13|300,000,000.0|2007.0|7.1|Action 3 | Color|Sam Mendes|602.0|148.0|200074175.0|Spectre |994.0|UK|PG-13|245,000,000.0|2015.0|6.8|Action 4 | Color|Christopher Nolan|813.0|164.0|448130642.0|The Dark Knight Rises |2701.0|USA|PG-13|250,000,000.0|2012.0|8.5|Action 5 | ?|Doug Walker|?|?|?|Star Wars: Episode VII - The Force Awakens  |?|?|?|?|?|7.1|Documentary 6 | Color|Andrew Stanton|462.0|132.0|73058679.0|John Carter |738.0|USA|PG-13|263,700,000.0|2012.0|6.6|Action 7 | Color|Sam Raimi|392.0|156.0|336530303.0|Spider-Man 3 |1902.0|USA|PG-13|258,000,000.0|2007.0|6.2|Action 8 | Color|Nathan Greno|324.0|100.0|200807262.0|Tangled |387.0|USA|PG|260,000,000.0|2010.0|7.8|Adventure 9 | Color|Joss Whedon|635.0|141.0|458991599.0|Avengers: Age of Ultron |1117.0|USA|PG-13|250,000,000.0|2015.0|7.5|Action 10 | Color|David Yates|375.0|153.0|301956980.0|Harry Potter and the Half-Blood Prince |973.0|UK|PG|250,000,000.0|2009.0|7.5|Adventure 11 | Color|Zack Snyder|673.0|183.0|330249062.0|Batman v Superman: Dawn of Justice |3018.0|USA|PG-13|250,000,000.0|2016.0|6.9|Action 12 | Color|Bryan Singer|434.0|169.0|200069408.0|Superman Returns |2367.0|USA|PG-13|209,000,000.0|2006.0|6.1|Action 13 | Color|Marc Forster|403.0|106.0|168368427.0|Quantum of Solace |1243.0|UK|PG-13|200,000,000.0|2008.0|6.7|Action 14 | Color|Gore Verbinski|313.0|151.0|423032628.0|Pirates of the Caribbean: Dead Man's Chest |1832.0|USA|PG-13|225,000,000.0|2006.0|7.3|Action 15 | Color|Gore Verbinski|450.0|150.0|89289910.0|The Lone Ranger |711.0|USA|PG-13|215,000,000.0|2013.0|6.5|Action 16 | Color|Zack Snyder|733.0|143.0|291021565.0|Man of Steel |2536.0|USA|PG-13|225,000,000.0|2013.0|7.2|Action 17 | Color|Andrew Adamson|258.0|150.0|141614023.0|The Chronicles of Narnia: Prince Caspian |438.0|USA|PG|225,000,000.0|2008.0|6.6|Action 18 | Color|Joss Whedon|703.0|173.0|623279547.0|The Avengers |1722.0|USA|PG-13|220,000,000.0|2012.0|8.1|Action 19 | Color|Rob Marshall|448.0|136.0|241063875.0|Pirates of the Caribbean: On Stranger Tides |484.0|USA|PG-13|250,000,000.0|2011.0|6.7|Action 20 | Color|Barry Sonnenfeld|451.0|106.0|179020854.0|Men in Black 3 |341.0|USA|PG-13|225,000,000.0|2012.0|6.8|Action 21 | Color|Peter Jackson|422.0|164.0|255108370.0|The Hobbit: The Battle of the Five Armies |802.0|New Zealand|PG-13|250,000,000.0|2014.0|7.5|Adventure 22 | Color|Marc Webb|599.0|153.0|262030663.0|The Amazing Spider-Man |1225.0|USA|PG-13|230,000,000.0|2012.0|7.0|Action 23 | Color|Ridley Scott|343.0|156.0|105219735.0|Robin Hood |546.0|USA|PG-13|200,000,000.0|2010.0|6.7|Action 24 | Color|Peter Jackson|509.0|186.0|258355354.0|The Hobbit: The Desolation of Smaug |951.0|USA|PG-13|225,000,000.0|2013.0|7.9|Adventure 25 | Color|Chris Weitz|251.0|113.0|70083519.0|The Golden Compass |666.0|USA|PG-13|180,000,000.0|2007.0|6.1|Adventure 26 | Color|Peter Jackson|446.0|201.0|218051260.0|King Kong |2618.0|New Zealand|PG-13|207,000,000.0|2005.0|7.2|Action 27 | Color|James Cameron|315.0|194.0|658672302.0|Titanic |2528.0|USA|PG-13|200,000,000.0|1997.0|7.7|Drama 28 | Color|Anthony Russo|516.0|147.0|407197282.0|Captain America: Civil War |1022.0|USA|PG-13|250,000,000.0|2016.0|8.2|Action 29 | Color|Peter Berg|377.0|131.0|65173160.0|Battleship |751.0|USA|PG-13|209,000,000.0|2012.0|5.9|Action 30 | Color|Colin Trevorrow|644.0|124.0|652177271.0|Jurassic World |1290.0|USA|PG-13|150,000,000.0|2015.0|7.0|Action 31 | Color|Sam Mendes|750.0|143.0|304360277.0|Skyfall |1498.0|UK|PG-13|200,000,000.0|2012.0|7.8|Action 32 | Color|Sam Raimi|300.0|135.0|373377893.0|Spider-Man 2 |1303.0|USA|PG-13|200,000,000.0|2004.0|7.3|Action 33 | Color|Shane Black|608.0|195.0|408992272.0|Iron Man 3 |1187.0|USA|PG-13|200,000,000.0|2013.0|7.2|Action 34 | Color|Tim Burton|451.0|108.0|334185206.0|Alice in Wonderland |736.0|USA|PG|200,000,000.0|2010.0|6.5|Adventure 35 | Color|Brett Ratner|334.0|104.0|234360014.0|X-Men: The Last Stand |1912.0|Canada|PG-13|210,000,000.0|2006.0|6.8|Action 36 | Color|Dan Scanlon|376.0|104.0|268488329.0|Monsters University |265.0|USA|G|200,000,000.0|2013.0|7.3|Adventure 37 | Color|Michael Bay|366.0|150.0|402076689.0|Transformers: Revenge of the Fallen |1439.0|USA|PG-13|200,000,000.0|2009.0|6.0|Action 38 | Color|Michael Bay|378.0|165.0|245428137.0|Transformers: Age of Extinction |918.0|USA|PG-13|210,000,000.0|2014.0|5.7|Action 39 | Color|Sam Raimi|525.0|130.0|234903076.0|Oz the Great and Powerful |511.0|USA|PG|215,000,000.0|2013.0|6.4|Adventure 40 | Color|Marc Webb|495.0|142.0|202853933.0|The Amazing Spider-Man 2 |1067.0|USA|PG-13|200,000,000.0|2014.0|6.7|Action 41 | Color|Joseph Kosinski|469.0|125.0|172051787.0|TRON: Legacy |665.0|USA|PG|170,000,000.0|2010.0|6.8|Action 42 | Color|John Lasseter|304.0|106.0|191450875.0|Cars 2 |283.0|USA|G|200,000,000.0|2011.0|6.3|Adventure 43 | Color|Martin Campbell|436.0|123.0|116593191.0|Green Lantern |550.0|USA|PG-13|200,000,000.0|2011.0|5.6|Action 44 | Color|Lee Unkrich|453.0|103.0|414984497.0|Toy Story 3 |733.0|USA|G|200,000,000.0|2010.0|8.3|Adventure 45 | Color|McG|422.0|118.0|125320003.0|Terminator Salvation |974.0|USA|PG-13|200,000,000.0|2009.0|6.6|Action 46 | Color|James Wan|424.0|140.0|350034110.0|Furious 7 |657.0|USA|PG-13|190,000,000.0|2015.0|7.2|Action 47 | Color|Marc Forster|654.0|123.0|202351611.0|World War Z |995.0|USA|PG-13|190,000,000.0|2013.0|7.0|Action 48 | Color|Bryan Singer|539.0|149.0|233914986.0|X-Men: Days of Future Past |752.0|USA|PG-13|200,000,000.0|2014.0|8.0|Action 49 | Color|J.J. Abrams|590.0|132.0|228756232.0|Star Trek Into Darkness |1171.0|USA|PG-13|190,000,000.0|2013.0|7.8|Action 50 | Color|Bryan Singer|338.0|114.0|65171860.0|Jack the Giant Slayer |205.0|USA|PG-13|195,000,000.0|2013.0|6.3|Adventure 51 | Color|Baz Luhrmann|490.0|143.0|144812796.0|The Great Gatsby |753.0|Australia|PG-13|105,000,000.0|2013.0|7.3|Drama 52 | Color|Mike Newell|306.0|116.0|90755643.0|Prince of Persia: The Sands of Time |453.0|USA|PG-13|200,000,000.0|2010.0|6.6|Action 53 | Color|Guillermo del Toro|575.0|131.0|101785482.0|Pacific Rim |1106.0|USA|PG-13|190,000,000.0|2013.0|7.0|Action 54 | Color|Michael Bay|428.0|154.0|352358779.0|Transformers: Dark of the Moon |899.0|USA|PG-13|195,000,000.0|2011.0|6.3|Action 55 | Color|Steven Spielberg|470.0|122.0|317011114.0|Indiana Jones and the Kingdom of the Crystal Skull |2054.0|USA|PG-13|185,000,000.0|2008.0|6.2|Action 56 | Color|Peter Sohn|298.0|93.0|123070338.0|The Good Dinosaur |345.0|USA|PG|?|2015.0|6.8|Adventure 57 | Color|Mark Andrews|488.0|93.0|237282182.0|Brave |428.0|USA|PG|185,000,000.0|2012.0|7.2|Adventure 58 | Color|Justin Lin|322.0|122.0|130468626.0|Star Trek Beyond |432.0|USA|PG-13|185,000,000.0|2016.0|7.5|Action 59 | Color|Andrew Stanton|421.0|98.0|223806889.0|WALL·E |1043.0|USA|G|180,000,000.0|2008.0|8.4|Adventure 60 | Color|Brett Ratner|162.0|91.0|140080850.0|Rush Hour 3 |221.0|USA|PG-13|140,000,000.0|2007.0|6.2|Action 61 | Color|Roland Emmerich|367.0|158.0|166112167.0|2012 |1055.0|USA|PG-13|200,000,000.0|2009.0|5.8|Action 62 | Color|Robert Zemeckis|240.0|96.0|137850096.0|A Christmas Carol |249.0|USA|PG|200,000,000.0|2009.0|6.8|Animation 63 | Color|Lana Wachowski|384.0|127.0|47375327.0|Jupiter Ascending |720.0|USA|PG-13|176,000,000.0|2015.0|5.4|Action 64 | Color|David Yates|248.0|110.0|124051759.0|The Legend of Tarzan |239.0|USA|PG-13|180,000,000.0|2016.0|6.6|Action 65 | Color|Andrew Adamson|284.0|150.0|291709845.0|The Chronicles of Narnia: The Lion, the Witch and the Wardrobe |1463.0|USA|PG|180,000,000.0|2005.0|6.9|Adventure 66 | Color|Bryan Singer|396.0|144.0|154985087.0|X-Men: Apocalypse |622.0|USA|PG-13|178,000,000.0|2016.0|7.3|Action 67 | Color|Christopher Nolan|645.0|152.0|533316061.0|The Dark Knight |4667.0|USA|PG-13|185,000,000.0|2008.0|9.0|Action 68 | Color|Pete Docter|408.0|96.0|292979556.0|Up |704.0|USA|PG|175,000,000.0|2009.0|8.3|Adventure 69 | Color|Rob Letterman|219.0|94.0|198332128.0|Monsters vs. Aliens |187.0|USA|PG|175,000,000.0|2009.0|6.5|Action 70 | Color|Jon Favreau|486.0|126.0|318298180.0|Iron Man |1055.0|USA|PG-13|140,000,000.0|2008.0|7.9|Action 71 | Color|Martin Scorsese|682.0|126.0|73820094.0|Hugo |678.0|USA|PG|170,000,000.0|2011.0|7.5|Adventure 72 | Color|Barry Sonnenfeld|85.0|106.0|113745408.0|Wild Wild West |648.0|USA|PG-13|170,000,000.0|1999.0|4.8|Action 73 | Color|Rob Cohen|264.0|112.0|102176165.0|The Mummy: Tomb of the Dragon Emperor |501.0|USA|PG-13|145,000,000.0|2008.0|5.2|Action 74 | Color|David Ayer|418.0|123.0|161087183.0|Suicide Squad |971.0|USA|PG-13|175,000,000.0|2016.0|6.9|Action 75 | Color|Tom Shadyac|186.0|96.0|100289690.0|Evan Almighty |257.0|USA|PG|175,000,000.0|2007.0|5.4|Comedy 76 | Color|Doug Liman|585.0|113.0|100189501.0|Edge of Tomorrow |741.0|USA|PG-13|178,000,000.0|2014.0|7.9|Action 77 | Color|Kevin Reynolds|91.0|176.0|88246220.0|Waterworld |309.0|USA|PG-13|175,000,000.0|1995.0|6.1|Action 78 | Color|Stephen Sommers|250.0|118.0|150167630.0|G.I. Joe: The Rise of Cobra |534.0|USA|PG-13|175,000,000.0|2009.0|5.8|Action 79 | Color|Pete Docter|536.0|95.0|356454367.0|Inside Out |773.0|USA|PG|175,000,000.0|2015.0|8.3|Adventure 80 | Color|Jon Favreau|370.0|106.0|362645141.0|The Jungle Book |398.0|UK|PG|175,000,000.0|2016.0|7.8|Adventure 81 | Color|Jon Favreau|453.0|124.0|312057433.0|Iron Man 2 |723.0|USA|PG-13|200,000,000.0|2010.0|7.0|Action 82 | Color|Rupert Sanders|416.0|132.0|155111815.0|Snow White and the Huntsman |710.0|USA|PG-13|170,000,000.0|2012.0|6.1|Action 83 | Color|Robert Stromberg|401.0|97.0|241407328.0|Maleficent |634.0|USA|PG|180,000,000.0|2014.0|7.0|Action 84 | Color|Matt Reeves|521.0|130.0|208543795.0|Dawn of the Planet of the Apes |620.0|USA|PG-13|170,000,000.0|2014.0|7.6|Action 85 | Color|Roland Joffé|10.0|109.0|?|The Lovers |15.0|Belgium|R|?|2015.0|4.5|Action 86 | Color|Carl Rinsch|218.0|128.0|38297305.0|47 Ronin |324.0|USA|PG-13|175,000,000.0|2013.0|6.3|Action 87 | Color|Anthony Russo|576.0|136.0|259746958.0|Captain America: The Winter Soldier |742.0|USA|PG-13|170,000,000.0|2014.0|7.8|Action 88 | Color|Mike Mitchell|226.0|93.0|238371987.0|Shrek Forever After |173.0|USA|PG|165,000,000.0|2010.0|6.4|Adventure 89 | Color|Brad Bird|443.0|130.0|93417865.0|Tomorrowland |497.0|USA|PG|190,000,000.0|2015.0|6.5|Action 90 | Color|Don Hall|384.0|102.0|222487711.0|Big Hero 6 |433.0|USA|PG|165,000,000.0|2014.0|7.9|Action 91 | Color|Rich Moore|377.0|101.0|189412677.0|Wreck-It Ralph |345.0|USA|PG|165,000,000.0|2012.0|7.8|Adventure 92 | Color|Robert Zemeckis|188.0|100.0|665426.0|The Polar Express |444.0|USA|G|165,000,000.0|2004.0|6.6|Adventure 93 | Color|Roland Emmerich|286.0|120.0|102315545.0|Independence Day: Resurgence |520.0|USA|PG-13|165,000,000.0|2016.0|5.5|Action 94 | Color|Dean DeBlois|288.0|98.0|217387997.0|How to Train Your Dragon |492.0|USA|PG|165,000,000.0|2010.0|8.2|Adventure 95 | Color|Jonathan Mostow|280.0|109.0|150350192.0|Terminator 3: Rise of the Machines |1676.0|USA|R|200,000,000.0|2003.0|6.4|Action 96 | Color|James Gunn|653.0|121.0|333130696.0|Guardians of the Galaxy |1097.0|USA|PG-13|170,000,000.0|2014.0|8.1|Action 97 | Color|Christopher Nolan|712.0|169.0|187991439.0|Interstellar |2725.0|USA|PG-13|165,000,000.0|2014.0|8.6|Adventure 98 | Color|Christopher Nolan|642.0|148.0|292568851.0|Inception |2803.0|USA|PG-13|160,000,000.0|2010.0|8.8|Action 99 | Color|Hideaki Anno|1.0|120.0|?|Godzilla Resurgence |13.0|Japan|?|?|2016.0|8.2|Action 100 | Color|Peter Jackson|645.0|182.0|303001229.0|The Hobbit: An Unexpected Journey |1367.0|USA|PG-13|180,000,000.0|2012.0|7.9|Adventure 101 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | column_names = ['color', 'director_name', 'num_critic_for_reviews', 'duration', 5 | 'gross', 'movie_title', 'num_user_for_reviews', 'country', 6 | 'cotent_rating', 'budget', 'title_year', 'imdb_score', 'genre'] 7 | 8 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/solutions/solution_read_csv.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | column_names = ['color', 'director_name', 'num_critic_for_reviews', 'duration', 5 | 'gross', 'movie_title', 'num_user_for_reviews', 'country', 6 | 'cotent_rating', 'budget', 'title_year', 'imdb_score', 'genre'] 7 | 8 | movies = pd.read_csv('movies.csv', 9 | sep='|', 10 | header=None, 11 | names=column_names, 12 | na_values='?', 13 | thousands=',', 14 | index_col='movie_title') -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/tests/test_budget.py: -------------------------------------------------------------------------------- 1 | def test_budget(): 2 | assert movies.loc[:, 'budget'].min() == 105000000.0 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/tests/test_country.py: -------------------------------------------------------------------------------- 1 | def test_country(): 2 | assert '?' not in movies.country.unique() -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-3-advanced-parsing-on-movies-dataset/tests/test_shape.py: -------------------------------------------------------------------------------- 1 | def test_shape(): 2 | assert movies.shape == (100, 12) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "d50c66f0-e9b6-4426-b52c-21d461f1e935" 3 | name = "TSV with The Simpsons episodes" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/README.md: -------------------------------------------------------------------------------- 1 | # TSV with The Simpsons episodes 2 | 3 | Read and store in a `simpsons` DataFrame the data within the `simpsons-episodes.tsv` TSV (_Tabular Separated Values_) file. This file contains information about all The Simpsons episodes. 4 | 5 | Take a look at the file before you read it into a DataFrame and see what will be necessary to parse it correctly. 6 | 7 | - Use correct separator as data is tabular separated. 8 | - Use the following `col_names` list as column names. 9 | - Load just `Title`, `Air date`, `Production code` and `IMDB rating`. 10 | - Don't load the first empty columns. 11 | - Set `Production code` as index. 12 | - Null values are encoded as `no_val` values, be careful with that when loading the data. 13 | - Parse the `Air date` columns as Date. 14 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/files/simpsons-episodes.tsv: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Two Cars in Every Garage and Three Eyes on Every Fish 1/11/90 7F01 2 4 17 26.1 64959 8.1 6 | no_val 15/11/90 7F08 2 6 19 25.4 50691 8 7 | Bart the Daredevil 6/12/90 7F06 2 8 21 26.2 57605 no_val 8 | Bart Gets Hit by a Car 10/1/91 no_val 2 10 23 24.8 56486 7.8 9 | Homer vs. Lisa and the 8th Commandment 7/2/91 7F13 2 13 26 26.2 58277 8 10 | "Oh Brother, Where Art Thou?" 21/2/91 7F16 2 15 28 no_val 47426 8.2 11 | Old Money 28/3/91 7F17 2 17 30 21.2 44331 7.6 12 | Lisa's Substitute 25/4/91 7F19 2 19 32 17.7 52770 8.5 13 | Blood Feud 11/7/91 7F22 no_val 22 35 17.3 52829 8 14 | Mr. Lisa Goes to Washington 26/9/91 8F01 3 2 37 20.2 52098 7.7 15 | Bart the Murderer 10/10/91 8F03 3 4 39 no_val 64342 8.7 16 | "Like Father, Like Clown" 24/10/91 8F05 3 6 41 20.2 45586 7.7 17 | Saturdays of Thunder 14/11/91 8F07 3 9 44 24.7 55808 7.9 18 | Burns Verkaufen der Kraftwerk 5/12/91 8F09 3 11 46 21.1 55987 8.2 19 | no_val 9/1/92 8F11 3 13 48 24.2 58919 no_val 20 | Bart the Lover 13/2/92 8F16 3 16 51 20.5 53123 8.3 21 | Separate Vocations 27/2/92 8F15 3 18 53 23.7 61508 8.2 22 | Colonel Homer 26/3/92 8F19 3 20 55 25.5 46901 7.9 23 | Bart's Friend Falls in Love 7/5/92 8F22 3 23 58 19.5 48058 7.8 24 | Kamp Krusty 24/9/92 8F24 4 1 60 21.8 67081 8.4 25 | Itchy & Scratchy: The Movie 3/11/92 9F03 4 6 65 20.1 55740 8.2 26 | Lisa's First Word 3/12/92 9F08 no_val 10 69 28.6 62070 8.5 27 | Selma's Choice 21/1/93 9F11 4 13 72 24.5 56396 8 28 | The Call of the Simpsons 18/2/90 7G09 1 7 7 27.6 57793 7.9 29 | "One Fish, Two Fish, Blowfish, Blue Fish" 24/1/91 7F12 2 11 24 24.2 50206 8.8 30 | Marge in Chains 6/5/93 9F20 4 21 80 no_val 68692 7.7 31 | Homer's Barbershop Quartet 30/9/93 9F21 5 1 82 19.9 58390 8.4 32 | Homer Goes to College 14/10/93 1F02 5 3 84 18.1 64802 8.6 33 | Marge on the Lam 4/11/93 1F03 5 6 87 21.7 53490 8 34 | Boy-Scoutz 'n the Hood 18/11/93 1F06 5 8 89 20.1 83238 8.7 35 | Homer the Vigilante 6/1/94 1F09 5 11 92 20.1 74673 8.2 36 | Bart Gets Famous 3/2/94 1F11 no_val 12 93 20 66267 8.1 37 | Lisa vs. Malibu Stacy 17/2/94 1F12 5 14 95 20.5 61715 8.2 38 | Bart Gets an Elephant 31/3/94 1F15 5 17 98 17 63427 7.9 39 | Lady Bouvier's Lover 12/5/94 1F21 5 21 102 15.1 59503 7.5 40 | Bart of Darkness 4/9/94 1F22 6 1 104 15.1 65126 8.6 41 | Itchy & Scratchy Land 2/10/94 2F01 6 4 107 14.8 72722 8.5 42 | Lisa on Ice 13/11/94 2F05 6 8 111 17.9 63564 8.4 43 | Fear of Flying 18/12/94 2F08 6 11 114 15.6 61569 7.8 44 | And Maggie Makes Three 22/1/95 2F10 6 13 116 17.3 63051 8.5 45 | Homie the Clown 12/2/95 2F12 6 15 118 17.6 73123 8.5 46 | Homer vs. Patty and Selma 26/2/95 2F14 6 17 120 18.9 60599 7.9 47 | no_val 9/4/95 2F18 6 20 123 11.6 62323 8.1 48 | 'Round Springfield 30/4/95 2F32 6 22 125 12.6 56001 8.3 49 | Lemon of Troy 14/5/95 2F22 6 24 127 13.1 70698 8.6 50 | Radioactive Man 24/9/95 2F17 7 2 130 15.7 62390 8.3 51 | Bart Sells His Soul 8/10/95 3F02 7 4 132 14.8 65333 8.7 52 | Treehouse of Horror VI 29/10/95 3F04 7 6 134 19.7 110342 8.5 53 | Marge Be Not Proud 17/12/95 3F07 7 11 139 16.7 68970 8.3 54 | Team Homer 7/1/96 no_val 7 12 140 16.7 72268 8.3 55 | Bart the Fink 11/2/96 3F12 7 15 143 15 71230 7.7 56 | no_val 12/11/92 9F06 4 8 67 23.1 54557 8.2 57 | 22 Short Films About Springfield 14/4/96 3F18 7 21 149 10.5 66536 8.8 58 | Much Apu About Nothing 5/5/96 3F20 7 23 151 11.3 75618 8 59 | Summer of 4 Ft. 2 19/5/96 3F22 7 25 153 14.7 65847 8.3 60 | "Burns, Baby Burns" 17/11/96 4F05 8 4 157 12.6 55497 7.7 61 | Lisa's Date with Density 15/12/96 4F01 8 7 160 NA 60912 7.8 62 | The Springfield Files 12/1/97 3G01 8 10 163 20.9 69555 9 63 | The Twisted World of Marge Simpson 19/1/97 4F08 8 11 164 14 71813 7.8 64 | The Itchy & Scratchy & Poochie Show 9/2/97 4F12 8 14 167 15.5 58581 7.9 65 | Homer's Phobia 16/2/97 4F11 8 15 168 15.3 63355 8.9 66 | Homer vs. the Eighteenth Amendment 16/3/97 4F15 8 18 171 14.6 83561 8.7 67 | The Canine Mutiny 13/4/97 4F16 8 20 173 NA 54155 7.7 68 | In Marge We Trust 27/4/97 4F18 8 22 175 16.9 59088 8 69 | The Secret War of Lisa Simpson 18/5/97 4F21 8 25 178 12.7 59196 7.8 70 | The Principal and the Pauper 28/9/97 4F23 9 2 180 14.9 48414 7.4 71 | Bart Star 9/11/97 5F03 9 6 184 10.6 31033 7.7 72 | Lisa the Skeptic 23/11/97 5F05 9 8 186 9.3 22318 8 73 | "All Singing, All Dancing" 4/1/98 5F24 9 11 189 8.9 15780 5.1 74 | The Joy of Sect 8/2/98 5F23 9 13 191 9.4 27710 8.2 75 | This Little Wiggy 22/3/98 5F13 9 18 196 8.9 20739 7.8 76 | The Trouble with Trillions 5/4/98 5F14 9 20 198 7.4 23426 7.9 77 | Trash of the Titans 26/4/98 5F09 9 22 200 10.2 26299 8.5 78 | Natural Born Kissers 17/5/98 5F18 9 25 203 8.6 53823 8.1 79 | The Wizard of Evergreen Terrace 20/9/98 5F21 10 2 205 7.95 53216 8.2 80 | Treehouse of Horror IX 25/10/98 AABF01 10 4 207 8.5 83169 8 81 | Mayored to the Mob 20/12/98 AABF05 10 9 212 8.5 56762 8.2 82 | Wild Barts Can't Be Broken 17/1/99 AABF07 10 11 214 8.8 57693 7.7 83 | Make Room for Lisa 28/2/99 AABF12 10 16 219 7.6 53449 7.5 84 | Mom and Pop Art 11/4/99 AABF15 10 19 222 8.5 47851 7.6 85 | Monty Can't Buy Me Love 2/5/99 AABF17 10 21 224 7.26 44242 7.2 86 | Thirty Minutes over Tokyo 16/5/99 AABF20 10 23 226 8 55947 7.9 87 | Guess Who's Coming to Criticize Dinner? 24/10/99 no_val 11 3 229 6.7 46141 7.5 88 | E-I-E-I-(Annoyed Grunt) 7/11/99 AABF19 11 5 231 8.4 51431 7.6 89 | Eight Misbehavin' 21/11/99 BABF03 11 7 233 9.2 40465 7.1 90 | The Mansion Family 23/1/00 BABF08 11 12 238 11.3 43949 7.3 91 | "Alone Again, Natura-diddily" 13/2/00 BABF11 11 14 240 10.8 47392 7.9 92 | Pygmoelian 27/2/00 BABF12 11 16 242 9.4 52891 7.3 93 | Kill the Alligator and Run 30/4/00 BABF16 11 19 245 7.46 52176 6.6 94 | "It's a Mad, Mad, Mad, Mad Marge" 14/5/00 BABF18 11 21 247 7.5 54146 7.3 95 | no_val 1/11/00 BABF21 12 1 249 13.2 77719 7.6 96 | Insane Clown Poppy 12/11/00 BABF17 12 3 251 16.4 40443 7.1 97 | The Computer Wore Menace Shoes 3/12/00 CABF02 12 6 254 15.6 51100 7.7 98 | Pokey Mom 14/1/01 CABF05 12 10 258 15 51024 7.3 99 | Day of the Jackanapes 18/2/01 CABF10 12 13 261 15.4 49986 7.2 100 | "Hungry, Hungry Homer" 4/3/01 CABF09 12 15 263 17.6 49811 7.4 101 | Simpson Safari 1/4/01 CABF13 12 17 265 13.3 49065 6.9 102 | Children of a Lesser Clod 13/5/01 CABF16 12 20 268 13.8 50070 7.3 103 | Treehouse of Horror XII 6/11/01 CABF19 13 1 270 13 77136 7.5 104 | Homer the Moe 18/11/01 CABF20 13 3 272 14.4 44651 7.2 105 | The Blunder Years 9/12/01 CABF21 13 5 274 12.9 45288 7.7 106 | Half-Decent Proposal 10/2/02 DABF04 13 10 279 13.2 42977 7.5 107 | The Lastest Gun in the West 24/2/02 DABF07 13 12 281 13.2 44787 6.5 108 | Blame It on Lisa 31/3/02 DABF10 13 15 284 11.1 50694 7 109 | Gump Roast 21/4/02 DABF12 13 17 286 12.3 46335 5.6 110 | Homer's Triple Bypass 17/12/92 9F09 4 11 70 23.6 57400 8.7 111 | Bart vs. Lisa vs. the Third Grade 17/11/02 DABF20 14 3 294 13.3 43130 7 112 | The Great Louse Detective 15/12/02 EABF01 14 6 297 15.5 48110 7.3 113 | The Dad Who Knew Too Little 12/1/03 EABF03 14 8 299 12.8 47170 7.3 114 | Pray Anything 9/2/03 EABF06 14 10 301 13.4 46336 6.8 115 | C.E.D'oh 16/3/03 EABF10 14 15 306 13 47386 7.3 116 | Three Gays of the Condo 13/4/03 EABF12 14 17 308 12.02 49263 7.2 117 | "Brake My Wife, Please" 11/5/03 EABF15 14 20 311 10.56 47288 6.9 118 | Moe Baby Blues 18/5/03 EABF17 14 22 313 13.44 45931 7.7 119 | My Mother the Carjacker 9/11/03 EABF18 15 2 315 12.4 34590 7.3 120 | The Fat and the Furriest 30/11/03 EABF19 15 5 318 11.7 39180 7.2 121 | 'Tis the Fifteenth Season 14/12/03 no_val 15 7 320 11.3 40667 7.2 122 | "I, (Annoyed Grunt)-bot" 11/1/04 FABF04 15 9 322 16.3 42776 7.3 123 | Smart & Smarter 22/2/04 FABF09 15 13 326 12.6 43969 7.1 124 | Co-Dependents' Day 21/3/04 FABF10 15 15 328 11.2 47246 6.9 125 | Catch 'Em If You Can 25/4/04 FABF14 15 18 331 9.3 47274 7 126 | The Way We Weren't 9/5/04 FABF13 15 20 333 6.6 43128 7.3 127 | Fraudcast News 23/5/04 FABF18 15 22 335 9.2 44954 7.2 128 | Sleeping with the Enemy 21/11/04 FABF19 16 3 338 9.95 40958 7.1 129 | Fat Man and Little Boy 12/12/04 FABF21 16 5 340 10.31 44210 7.1 130 | Mommie Beerest 30/1/05 GABF01 16 7 342 9.97 46256 7 131 | There's Something About Marrying 20/2/05 GABF04 16 10 345 10.39 49371 7.1 132 | Goo Goo Gai Pan 13/3/05 GABF06 16 12 347 10.28 44914 7 133 | The Seven-Beer Snitch 3/4/05 GABF08 16 14 349 7.48 45174 6.9 134 | The Heartbroke Kid 1/5/05 GABF11 16 17 352 10.79 50610 7.2 135 | Thank God It's Doomsday 8/5/05 GABF14 16 19 354 10.05 46504 7.3 136 | The Bonfire of the Manatees 11/9/05 GABF18 17 1 357 11.1 33933 6.3 137 | Duffless 18/2/93 9F14 4 16 75 25.7 84874 8.3 138 | no_val 27/11/05 GABF22 17 7 363 11.46 39577 6.7 139 | Simpsons Christmas Stories 18/12/05 HABF01 17 9 365 9.8 43082 6.9 140 | My Fair Laddy 26/2/06 HABF05 17 12 368 9.51 39745 6.4 141 | Bart Has Two Mommies 19/3/06 HABF07 17 14 370 8.75 44012 7 142 | Million-Dollar Abie 2/4/06 HABF09 17 16 372 7.83 42303 6.6 143 | Regarding Margie 7/5/06 HABF13 17 20 376 8.5 43162 6.7 144 | "The Mook, the Chef, the Wife and Her Homer" 10/9/06 HABF15 18 1 379 11.5 41321 7.5 145 | "Please Homer, Don't Hammer 'Em" 24/9/06 HABF20 18 3 381 9.72 41865 6.8 146 | G.I. (Annoyed Grunt) 12/11/06 HABF21 18 5 383 11.43 42160 6.9 147 | Ice Cream of Margie (with the Light Blue Hair) 26/11/06 HABF22 18 7 385 10.9 43032 7 148 | "Kill Gil, Volumes I & II" 17/12/06 no_val 18 9 387 8.96 43700 6.4 149 | Little Big Girl 11/2/07 JABF04 18 12 390 8.27 52730 7 150 | Yokel Chords 4/3/07 JABF09 18 14 392 9.09 41561 7.1 151 | no_val 25/3/07 JABF06 18 16 394 6.91 42602 7.2 152 | Crook and Ladder 6/5/07 JABF13 18 19 397 7.72 46262 7.1 153 | 24 Minutes 20/5/07 JABF14 18 21 399 9.8 45026 8.1 154 | The Homer of Seville 30/9/07 JABF18 19 2 402 8.4 33792 6.7 155 | Little Orphan Millie 11/11/07 JABF22 19 6 406 10.57 39369 6.7 156 | Funeral for a Fiend 25/11/07 KABF01 19 8 408 9 42596 7.1 157 | E Pluribus Wiggum 6/1/08 KABF03 19 10 410 8.2 44512 6.9 158 | The Debarted 2/3/08 KABF06 19 13 413 8.18 42141 7.7 159 | Smoke on the Daughter 30/3/08 KABF08 19 15 415 7.1 41735 6.7 160 | Apocalypse Cow 27/4/08 KABF10 19 17 417 7.69 41118 6.9 161 | Mona Leaves-a 11/5/08 KABF12 19 19 419 6.02 39443 7.1 162 | Lost Verizon 5/10/08 KABF15 20 2 422 7.43 38186 6.9 163 | Treehouse of Horror XIX 2/11/08 KABF16 20 4 424 12.48 21509 7.1 164 | So It's Come to This: A Simpsons Clip Show 1/4/93 9F17 4 18 77 25.5 49139 7.2 165 | Gone Maggie Gone 15/3/09 LABF04 20 13 433 5.99 43663 7.2 166 | Father Knows Worst 26/4/09 LABF08 20 18 438 5.94 42390 7 167 | Four Great Women and a Manicure 10/5/09 LABF09 20 20 440 5.16 44718 6.3 168 | Homer the Whopper 27/9/09 LABF13 21 1 442 8.31 39936 7.1 169 | no_val 29/11/09 LABF19 21 7 448 9.02 37909 6.8 170 | Thursdays with Abie 3/1/10 MABF02 21 9 450 8.65 36227 6.8 171 | Million Dollar Maybe 31/1/10 MABF03 21 11 452 5.11 40854 7.1 172 | Postcards from the Wedge 14/3/10 MABF04 21 14 455 5.23 41357 7.1 173 | The Greatest Story Ever D'ohed 28/3/10 MABF10 21 16 457 5.69 44070 5.7 174 | Moe Letter Blues 9/5/10 MABF13 21 21 462 5.66 40904 6.9 175 | Judge Me Tender 23/5/10 MABF15 21 23 464 5.74 41830 6.6 176 | Loan-a Lisa 3/10/10 MABF17 22 2 466 8.59 35051 6.8 177 | "Lisa Simpson, This Isn't Your Life" 14/11/10 no_val 22 5 469 8.97 40637 7.2 178 | The Fight Before Christmas 5/12/10 MABF22 22 8 472 9.54 43781 6.9 179 | Donnie Fatso 12/12/10 MABF19 22 9 473 7.18 40276 7 180 | Homer the Father 23/1/11 NABF05 22 12 476 6.5 42691 7 181 | Angry Dad: The Movie 20/2/11 NABF07 22 14 478 6.35 42693 7.2 182 | A Midsummer's Nice Dream 13/3/11 NABF09 22 16 480 5.44 38893 6.1 183 | The Great Simpsina 10/4/11 NABF11 22 18 482 4.99 41560 7 184 | 500 Keys 15/5/11 NABF14 22 21 485 6 46660 7.3 185 | The Falcon and the D'ohman 25/9/11 NABF16 23 1 487 8.08 39209 7.2 186 | Treehouse of Horror XXII 30/10/11 NABF19 23 3 489 8.1 63816 6.6 187 | The Food Wife 13/11/11 NABF20 23 5 491 7.5 42746 7.2 188 | The Ten-Per-Cent Solution 4/12/11 PABF02 23 8 494 9.01 39002 6.2 189 | "Politically Inept, with Homer Simpson" 8/1/12 PABF03 23 10 496 5.07 44074 6.1 190 | Moe Goes from Rags to Riches 29/1/12 PABF05 23 12 498 5.12 39838 5.7 191 | Pranks and Greens 22/11/09 LABF18 21 6 447 7.03 NA 6.7 192 | "$pringfield (or, How I Learned to Stop Worrying and Love Legalized Gambling)" 16/12/93 1F08 5 10 91 17.9 82216 8.5 193 | Beware My Cheating Bart 15/4/12 PABF11 23 18 504 4.86 43422 7.1 194 | no_val 6/5/12 PABF13 23 20 506 4.84 43544 6.9 195 | Lisa Goes Gaga 20/5/12 no_val 23 22 508 4.82 44434 4.5 196 | Penny-Wiseguys 18/11/12 PABF19 24 5 513 5.06 36897 6.3 197 | To Cur with Love 16/12/12 RABF01 24 8 516 3.77 40726 7.2 198 | A Test Before Trying 13/1/13 RABF03 24 10 518 5.04 41542 7 199 | Love is a Many-Splintered Thing 10/2/13 RABF07 24 12 520 4.19 41828 6.5 200 | Gorgeous Grampa 3/3/13 RABF06 24 14 522 4.66 39510 6.2 201 | What Animated Women Want 14/4/13 RABF08 24 17 525 4.11 43471 6.5 202 | Whiskey Business 5/5/13 RABF13 24 19 527 4.43 42810 6.8 203 | Homerland 29/9/13 RABF20 25 1 531 6.37 47531 7 204 | YOLO 10/11/13 RABF22 25 4 534 4.2 44551 6.7 205 | The Kid Is All Right 24/11/13 SABF02 25 6 536 6.78 39590 6.5 206 | White Christmas Blues 15/12/13 SABF01 25 8 538 8.48 39290 6.5 207 | Specs and the City 26/1/14 SABF06 25 11 541 3.87 44119 7.2 208 | The Man Who Grew Too Much 9/3/14 SABF07 25 13 543 3.75 44512 6.7 209 | The War of Art 23/3/14 SABF10 25 15 545 3.98 41726 7 210 | Luca$ 6/4/14 SABF12 25 17 547 4.3 45184 6.5 211 | Brick Like Me 4/5/14 RABF21 25 20 550 4.39 65613 7.7 212 | The Yellow Badge of Cowardge 18/5/14 SABF18 25 22 552 3.28 46408 6.7 213 | The Wreck of the Relationship 5/10/14 SABF17 26 2 554 4.27 38411 6.9 214 | Opposites A-Frack 2/11/14 SABF22 26 5 557 4.22 36410 6.3 215 | Blazed and Confused 16/11/14 TABF01 26 7 559 6.7 43513 6.9 216 | The Man Who Came to Be Dinner 4/1/15 RABF15 26 10 562 10.62 36622 6.8 217 | The Musk Who Fell to Earth 25/1/15 TABF04 26 12 564 3.29 35848 5.8 218 | Peeping Mom 19/4/15 TABF11 26 18 570 3.23 40157 6.7 219 | Life on the Fast Lane 18/3/90 7G11 1 9 9 33.5 64776 7.5 220 | The Crepes of Wrath 15/4/90 7G13 1 11 11 31.2 60458 7.8 221 | Some Enchanted Evening 13/5/90 7G01 1 13 13 27.1 57590 7.9 222 | Simpson and Delilah 18/10/90 7F02 2 2 15 29.9 58553 8.3 223 | Treehouse of Horror 25/10/90 7F04 2 3 16 27.4 130282 8.2 224 | Dancin' Homer 8/11/90 7F05 2 5 18 26.1 49005 7.5 225 | Bart vs. Thanksgiving 22/11/90 7F07 2 7 20 25.9 47539 7.7 226 | Itchy & Scratchy & Marge 20/12/90 7F09 2 9 22 22.2 55413 8.1 227 | The Way We Was 31/1/91 7F11 2 12 25 26.8 51182 8.2 228 | no_val 14/2/91 7F15 2 14 27 23.9 46823 7.5 229 | "Bart's Dog Gets an ""F""" 7/3/91 7F14 2 16 29 23.9 47780 7.5 230 | The War of the Simpsons 2/5/91 7F20 2 20 33 19.7 51997 7.9 231 | Bull-E 10/5/15 TABF15 26 21 573 2.77 43978 6.8 232 | Cue Detective 4/10/15 TABF17 27 2 576 6.02 178 6.7 233 | Friend with Benefit 8/11/15 TABF21 27 6 580 3.48 175 6.8 234 | Barthood 13/12/15 no_val 27 9 583 5.97 182 8.4 235 | Teenage Mutant Milk-Caused Hurdles 10/1/16 VABF04 27 11 585 8.33 172 6.8 236 | "Friends and Family""[203]" 2/10/16 VABF18 28 2 598 NA NA NA 237 | "The Town""[205]" 9/10/16 VABF17 28 3 599 NA NA NA 238 | "Treehouse of Horror XXVII""[207]" 16/10/16 VABF16 28 4 600 NA NA NA 239 | Gal of Constant Sorrow 21/2/16 VABF06 27 14 588 3.1 144 6.6 240 | The Marge-ian Chronicles 13/3/16 VABF09 27 16 590 3.07 201 7.3 241 | Fland Canyon 24/4/16 VABF12 27 19 593 2.77 192 7.1 242 | Simprovised 15/5/16 VABF13 27 21 595 2.8 228 6.4 243 | Simpsons Roasting on an Open Fire 17/12/89 7G08 1 1 1 26.7 171408 8.2 244 | Bart the Genius 14/1/90 7G02 1 2 2 24.5 91423 7.8 245 | There's No Disgrace Like Home 28/1/90 7G04 1 4 4 20.2 67378 7.8 246 | Moaning Lisa 11/2/90 7G06 1 6 6 27.4 55355 7.6 247 | The Telltale Head 25/2/90 no_val 1 8 8 28 66311 7.7 248 | Three Men and a Comic Book 9/5/91 7F21 2 21 34 21 50403 8.4 249 | Stark Raving Dad 19/9/91 7F24 3 1 36 22.9 55238 8.6 250 | When Flanders Failed 3/10/91 7F23 3 3 38 22.8 53499 8.2 251 | Homer Defined 17/10/91 8F04 3 5 40 20.6 50601 8.5 252 | The Front 15/4/93 9F16 4 19 78 20.1 53404 8.1 253 | Brother from the Same Planet 4/2/93 9F12 4 14 73 23.8 59040 8.1 254 | Treehouse of Horror IV 28/10/93 1F04 5 5 86 24 110251 8.7 255 | no_val 14/1/93 9F10 4 12 71 23 88171 9 256 | I Love Lisa 11/2/93 9F13 4 15 74 25.2 62309 8.3 257 | The Last Temptation of Homer 9/12/93 1F07 5 9 90 20.6 59350 8.4 258 | Dog of Death 12/3/92 8F17 3 19 54 23.4 49665 7.7 259 | Treehouse of Horror II 31/10/91 8F02 3 7 42 20 103012 8.2 260 | Lisa's Pony 7/11/91 8F06 3 8 43 23 53093 7.9 261 | Marge Gets a Job 5/11/92 9F05 4 7 66 22.9 69527 7.8 262 | I Married Marge 26/12/91 8F10 3 12 47 21.9 47880 8.2 263 | Last Exit to Springfield 11/3/93 9F15 4 17 76 22.4 71907 9 264 | Lisa the Greek 23/1/92 8F12 3 14 49 23.2 49457 8 265 | The Otto Show 23/4/92 8F21 3 22 57 17.5 50068 7.7 266 | Rosebud 21/10/93 1F01 5 4 85 19.5 57149 8.9 267 | Homer Alone 6/2/92 8F14 3 15 50 23.7 58991 8 268 | Homer at the Bat 20/2/92 8F13 3 17 52 24.6 72378 8.6 269 | Whacking Day 29/4/93 9F18 4 20 79 20 60739 8.1 270 | Lisa the Beauty Queen 15/10/92 9F02 4 4 63 19 52203 7.8 271 | Krusty Gets Kancelled 13/5/93 9F19 4 22 81 19.4 59948 8.2 272 | Black Widower 9/4/92 8F20 3 21 56 17.3 57582 8.2 273 | A Streetcar Named Marge 1/10/92 8F18 4 2 61 18.3 54487 8.1 274 | Treehouse of Horror III 29/10/92 9F04 4 5 64 25.1 108171 8.4 275 | Mr. Plow 19/11/92 9F07 4 9 68 24 63564 8.8 276 | Homer and Apu 10/2/94 1F10 5 13 94 21.8 58716 8.3 277 | Homer Loves Flanders 17/3/94 no_val 5 16 97 18 69996 8.5 278 | Burns' Heir 14/4/94 1F16 5 18 99 14.7 81678 8.4 279 | Sideshow Bob's Last Gleaming 26/11/95 3F08 7 9 137 14.2 61246 8 280 | Grampa vs. Sexual Inadequacy 4/12/94 2F07 6 10 113 14.1 64719 8 281 | A Fish Called Selma 24/3/96 3F15 7 19 147 12.9 57830 8.2 282 | Bart's Comet 5/2/95 2F11 6 14 117 18.7 67619 8.6 283 | Home Sweet Homediddly-Dum-Doodily 1/10/95 3F01 7 3 131 14.5 70120 8.3 284 | Scenes from the Class Struggle in Springfield 4/2/96 3F11 7 14 142 14.4 58572 7.7 285 | Bart vs. Australia 19/2/95 2F13 6 16 119 15.1 80724 8.5 286 | King-Size Homer 5/11/95 3F05 7 7 135 17 81426 9 287 | Secrets of a Successful Marriage 19/5/94 1F20 5 22 103 15.6 67959 8 288 | Lisa's Rival 11/9/94 1F17 6 2 105 16.7 54225 8.1 289 | A Star Is Burns 5/3/95 2F31 6 18 121 14.4 71936 8.5 290 | Lisa's Wedding 19/3/95 2F15 6 19 122 14.4 74266 8.3 291 | Another Simpsons Clip Show 25/9/94 2F33 6 3 106 13.5 42576 6 292 | Lisa the Vegetarian 15/10/95 3F03 7 5 133 14.6 69245 8.5 293 | The PTA Disbands 16/4/95 2F19 6 21 124 11.8 74788 8.1 294 | Sideshow Bob Roberts 9/10/94 2F02 6 5 108 14.4 76932 8.3 295 | Bart's Girlfriend 6/11/94 2F04 6 7 110 15.3 62450 8 296 | no_val 17/9/95 2F20 7 1 129 16 67579 8.9 297 | The Springfield Connection 7/5/95 2F21 6 23 126 12.7 79777 8.2 298 | Homer the Smithers 25/2/96 3F14 7 17 145 14.1 68354 8.9 299 | Homer Badman 27/11/94 2F06 6 9 112 17 71577 9 300 | Homer the Great 8/1/95 2F09 6 12 115 20.1 71002 8.9 301 | The Simpsons 138th Episode Spectacular 3/12/95 3F31 7 10 138 16.4 56153 7.5 302 | Two Bad Neighbors 14/1/96 3F09 7 13 141 16.5 64224 8.7 303 | Lisa the Iconoclast 18/2/96 3F13 7 16 144 13.4 58795 8.1 304 | Mother Simpson 19/11/95 3F06 7 8 136 15.3 61085 8.5 305 | "Raging Abe Simpson and His Grumbling Grandson in ""The Curse of the Flying Hellfish""" 28/4/96 3F19 7 22 150 13 69120 8.3 306 | Homerpalooza 19/5/96 3F21 7 24 152 12.9 60569 8 307 | Lisa's Sax 19/10/97 3G02 9 3 181 12.9 20008 8.1 308 | Simpsoncalifragilisticexpiala(Annoyed Grunt)cious 7/2/97 3G03 8 13 166 17.7 57608 7.7 309 | Treehouse of Horror VII 27/10/96 no_val 8 1 154 18.3 102077 8.3 310 | Brother from Another Series 23/2/97 4F14 8 16 169 15.1 56659 8.2 311 | The Homer They Fall 10/11/96 4F03 8 3 156 17 61146 8 312 | Bart After Dark 24/11/96 4F06 8 5 158 14.1 60210 8.2 313 | Lost Our Lisa 10/5/98 5F17 9 24 202 7.6 55316 7.7 314 | Girly Edition 19/4/98 5F15 9 21 199 8.5 21811 7.9 315 | Realty Bites 7/12/97 5F06 9 9 187 10.6 25183 7.5 316 | The Old Man and the Lisa 20/4/97 4F17 8 21 174 14 56833 7.9 317 | A Milhouse Divided 1/12/96 4F04 8 6 159 12.8 60956 8 318 | "My Sister, My Sitter" 2/3/97 4F13 8 17 170 15.1 54247 8.1 319 | The Last Temptation of Krust 22/2/98 5F10 9 15 193 9.5 20298 7.5 320 | The Cartridge Family 2/11/97 5F01 9 5 183 10.3 30921 8.2 321 | Grade School Confidential 6/4/97 4F09 8 19 172 13.3 60584 8.2 322 | Hurricane Neddy 29/12/96 4F07 8 8 161 NA 66281 8.8 323 | Simpson Tide 29/3/98 3G04 9 19 197 9 23127 8.3 324 | no_val 11/5/97 4F20 8 24 177 11.6 57926 7.3 325 | The City of New York vs. Homer Simpson 21/9/97 4F22 9 1 179 10.5 62962 9.1 326 | Miracle on Evergreen Terrace 21/12/97 5F07 9 10 188 9.6 19899 7.6 327 | King of the Hill 3/5/98 5F16 9 23 201 9.2 60952 8.3 328 | Das Bus 15/2/98 5F11 9 14 192 9.6 32487 8.1 329 | Lard of the Dance 23/8/98 5F20 10 1 204 7 56018 7.6 330 | Bart Carny 11/1/98 5F08 9 12 190 11.7 22426 7.7 331 | Lisa the Simpson 8/3/98 4F24 9 17 195 10.4 21608 8 332 | The Day the Violence Died 17/3/96 3F16 7 18 146 14.4 57809 8 333 | When You Dish Upon a Star 8/11/98 5F19 10 5 208 9 43485 7.3 334 | "Lisa Gets an ""A""" 22/11/98 AABF03 10 7 210 8 50013 8 335 | "Homer Simpson in: ""Kidney Trouble""" 6/12/98 AABF04 10 8 211 7.2 50300 7.3 336 | Lisa the Tree Hugger 19/11/00 CABF01 12 4 252 14.9 39480 7.2 337 | "Sunday, Cruddy Sunday" 31/1/99 AABF08 10 12 215 11.5 50051 6.9 338 | Maximum Homerdrive 28/3/99 AABF13 10 17 220 15.5 54195 7.6 339 | "Hello Gutter, Hello Fadder" 14/11/99 BABF02 11 6 232 9.2 44615 7.3 340 | Simpsons Bible Stories 4/4/99 AABF14 10 18 221 12.2 47155 7.3 341 | Tennis the Menace 11/2/01 CABF07 12 12 260 14 51004 6.9 342 | Viva Ned Flanders 10/1/99 AABF06 10 10 213 11.5 56561 7.8 343 | Treehouse of Horror X 31/10/99 BABF01 11 4 230 8.7 47980 7.7 344 | Last Tap Dance in Springfield 7/5/00 BABF15 11 20 246 7.3 47061 7.2 345 | no_val 3/10/99 AABF22 11 2 228 7.1 44172 7.5 346 | "The Old Man and the ""C"" Student" 25/4/99 AABF16 10 20 223 6.9 47550 7.3 347 | Bart to the Future 19/3/00 BABF13 11 17 243 8.77 75315 7 348 | Beyond Blunderdome 26/9/99 AABF23 11 1 227 8.1 34394 7.3 349 | They Saved Lisa's Brain 9/5/99 AABF18 10 22 225 6.8 47951 7.3 350 | Homer to the Max 7/2/99 AABF09 10 13 216 8.3 55726 7.7 351 | "Take My Wife, Sleaze" 28/11/99 BABF05 11 8 234 8.9 41484 7.1 352 | Little Big Mom 9/1/00 BABF04 11 10 236 10 48194 7.3 353 | Faith Off 16/1/00 BABF06 11 11 237 10.4 43869 6.9 354 | Worst Episode Ever 4/2/01 CABF08 12 11 259 18.5 49893 7.5 355 | Saddlesore Galactica 6/2/00 no_val 11 13 239 9.6 41259 6.6 356 | Behind the Laughter 21/5/00 BABF19 11 22 248 8.3 74046 7.9 357 | The Great Money Caper 10/12/00 CABF03 12 7 255 16.8 49325 7.3 358 | Missionary: Impossible 20/2/00 BABF10 11 15 241 9.8 50427 7.3 359 | Days of Wine and D'oh'ses 9/4/00 BABF14 11 18 244 8.3 48786 7.4 360 | Bart on the Road 31/3/96 3F17 7 20 148 11.8 70913 8.6 361 | no_val 11/3/01 CABF11 12 16 264 16.1 45718 6.5 362 | I'm Goin' to Praiseland 6/5/01 CABF15 12 19 267 13.1 49321 7.3 363 | Simpsons Tall Tales 20/5/01 CABF17 12 21 269 13.4 56698 7 364 | I Am Furious (Yellow) 28/4/02 DABF13 13 18 287 12.4 69650 7.7 365 | The Sweetest Apu 5/5/02 DABF14 13 19 288 11.8 47193 6.9 366 | The President Wore Pearls 16/11/03 EABF20 15 3 316 12.7 37456 7 367 | The Parent Rap 11/11/01 CABF22 13 2 271 14.9 47251 7.1 368 | Weekend at Burnsie's 7/4/02 DABF11 13 16 285 12.5 54539 7.7 369 | Large Marge 24/11/02 DABF18 14 4 295 17.4 55369 7.1 370 | The Bart Wants What It Wants 17/2/02 DABF06 13 11 280 11.2 45176 7.1 371 | Mr. Spritz Goes to Washington 9/3/03 EABF09 14 14 305 14.4 44837 6.9 372 | A Hunka Hunka Burns in Love 2/12/01 CABF18 13 4 273 13.4 37376 7.2 373 | How I Spent My Strummer Vacation 10/11/02 DABF22 14 2 293 12.5 35578 7.3 374 | She of Little Faith 16/12/01 DABF02 13 6 275 13.2 45824 7.1 375 | Helter Shelter 1/12/02 DABF21 14 5 296 15.1 42907 6.8 376 | Tales from the Public Domain 17/3/02 DABF08 13 14 283 11.7 50301 7.3 377 | The Strong Arms of the Ma 2/2/03 EABF04 14 9 300 15.4 51877 6.9 378 | Brawl in the Family 6/1/02 DABF01 13 7 276 11.8 45684 6.9 379 | Jaws Wired Shut 27/1/02 DABF05 13 9 278 14.2 49429 7.3 380 | Little Girl in the Big Ten 12/5/02 DABF15 13 20 289 11.2 46466 7.2 381 | Old Yeller-Belly 4/5/03 EABF14 14 19 310 11.59 43223 6.8 382 | Special Edna 5/1/03 EABF02 14 7 298 15 40867 7.1 383 | Barting Over 16/2/03 EABF05 14 11 302 21.3 47276 6.6 384 | "Dude, Where's My Ranch?" 27/4/03 EABF13 14 18 309 11.71 49000 7 385 | The Bart of War 18/5/03 EABF16 14 21 312 12.1 50464 6.6 386 | Treehouse of Horror XIV 2/11/03 EABF21 15 1 314 16.22 68381 7.4 387 | Mountain of Madness 2/2/97 4F10 8 12 165 9.1 60763 8.6 388 | Today I Am a Clown 7/12/03 FABF01 15 6 319 10.5 37890 6.6 389 | "Marge vs. Singles, Seniors, Childless Couples and Teens and Gays" 4/1/04 FABF03 15 8 321 12 50276 6.7 390 | Diatribe of a Mad Housewife 25/1/04 FABF05 15 10 323 10.6 45062 7.3 391 | All's Fair in Oven War 14/11/04 FABF20 16 2 337 11.64 41064 7 392 | Bart-Mangled Banner 16/5/04 FABF17 15 21 334 8.7 56275 6.2 393 | A Star Is Torn 8/5/05 GABF13 16 18 353 8.72 44500 6.8 394 | See Homer Run 20/11/05 no_val 17 6 362 10.3 40306 6.9 395 | Milhouse Doesn't Live Here Anymore 15/2/04 FABF07 15 12 325 9.4 46792 7.3 396 | The Ziff Who Came to Dinner 14/3/04 FABF08 15 14 327 10.7 43747 6.9 397 | Homer and Ned's Hail Mary Pass 6/2/05 GABF02 16 8 343 23.07 43356 6.4 398 | The Girl Who Slept Too Little 18/9/05 GABF16 17 2 358 9.79 35717 6.9 399 | The Wandering Juvie 28/3/04 FABF11 15 16 329 10.5 44539 6.9 400 | Milhouse of Sand and Fog 25/9/05 GABF19 17 3 359 10.19 35779 7 401 | Treehouse of Horror XVI 6/11/05 GABF17 17 4 360 11.63 74401 7.3 402 | Homer's Paternity Coot 8/1/06 HABF03 17 10 366 10.1 39552 6.7 403 | She Used to Be My Girl 5/12/04 FABF22 16 4 339 10.81 38908 6.6 404 | My Big Fat Geek Wedding 18/4/04 FABF12 15 17 330 9.2 42440 6.7 405 | no_val 17/4/05 GABF12 16 15 350 8.31 53146 7.3 406 | The Italian Bob 11/12/05 HABF02 17 8 364 10.39 45513 7 407 | Simple Simpson 2/5/04 FABF15 15 19 332 9.5 46273 7.3 408 | We're on the Road to D'ohwhere 29/1/06 HABF04 17 11 367 9.04 43599 7 409 | On a Clear Day I Can't See My Sister 6/3/05 GABF05 16 11 346 10.39 46309 6.9 410 | Home Away from Homer 15/5/05 GABF15 16 20 355 8.17 44606 7.1 411 | Treehouse of Horror XV 7/11/04 FABF23 16 1 336 11.29 72271 7.4 412 | Midnight Rx 16/1/05 FABF16 16 6 341 8.11 43118 7.3 413 | Pranksta Rap 13/2/05 GABF03 16 9 344 8.01 42759 6.8 414 | Dumbbell Indemnity 1/3/98 5F12 9 16 194 10.3 21214 7.6 415 | Girls Just Want to Have Sums 30/4/06 HABF12 17 19 375 8.7 45267 7.2 416 | The Monkey Suit 14/5/06 HABF14 17 21 377 8.3 48419 7.1 417 | The Boys of Bummer 29/4/07 JABF11 18 18 396 7.57 44770 6.3 418 | Treehouse of Horror XVIII 4/11/07 JABF16 19 5 405 11.7 69957 7.1 419 | Rome-Old and Juli-Eh 11/3/07 JABF08 18 15 393 8.98 41751 6.3 420 | Papa Don't Leech 13/4/08 KABF09 19 16 416 6.9 39238 6.1 421 | Marge and Homer Turn a Couple Play 21/5/06 no_val 17 22 378 8.23 42778 6.6 422 | The Wife Aquatic 7/1/07 JABF03 18 10 388 13.9 41312 6.6 423 | "Double, Double, Boy in Trouble" 19/10/08 KABF14 20 3 423 8.09 45781 7 424 | Treehouse of Horror XVII 5/11/06 HABF17 18 4 382 10.43 68799 7.1 425 | That '90s Show 27/1/08 KABF04 19 11 411 7.6 43485 6.3 426 | The Burns and the Bees 7/12/08 KABF21 20 8 428 6.19 38247 6.6 427 | Moe'N'a Lisa 19/11/06 HABF19 18 6 384 9.31 37177 6.8 428 | The Haw-Hawed Couple 10/12/06 JABF02 18 8 386 8.29 41161 7.2 429 | Husbands and Knives 18/11/07 JABF17 19 7 407 10.5 44445 7.1 430 | All About Lisa 18/5/08 KABF13 19 20 420 6.11 44616 6.4 431 | You Kent Always Say What You Want 20/5/07 JABF15 18 22 400 9.8 45281 7.3 432 | Dangerous Curves 9/11/08 KABF18 20 5 425 8.16 40078 6.6 433 | Springfield Up 18/2/07 JABF07 18 13 391 8.8 45036 7.3 434 | Revenge Is a Dish Best Served Three Times 28/1/07 JABF05 18 11 389 8.09 67621 7 435 | no_val 22/4/07 JABF10 18 17 395 6.4 47107 7.3 436 | Stop! Or My Dog Will Shoot 13/5/07 JABF12 18 20 398 6.48 42892 7 437 | Dial 'N' for Nerder 9/3/08 KABF07 19 14 414 7.3 41658 7.3 438 | "Love, Springfieldian Style" 17/2/08 KABF05 19 12 412 7.81 40507 6.6 439 | MyPods and Boomsticks 30/11/08 KABF20 20 7 427 7.8 40353 7.1 440 | "Sex, Pies and Idiot Scrapes" 28/9/08 KABF17 20 1 421 9.3 45735 7.2 441 | Any Given Sundance 4/5/08 KABF11 19 18 418 6.18 41440 7 442 | Bart the Mother 27/9/98 5F22 10 3 206 7.35 43240 7.5 443 | "Take My Life, Please" 15/2/09 LABF01 20 10 430 6.82 40679 7 444 | "No Loan Again, Naturally" 8/3/09 LABF03 20 12 432 5.99 41165 7 445 | no_val 26/9/10 MABF21 22 1 465 7.75 31638 6.3 446 | "Waverly Hills, 9-0-2-1-D'oh" 3/5/09 LABF10 20 19 439 6.75 45032 7.1 447 | The Bob Next Door 16/5/10 MABF11 21 22 463 6.26 43446 7.2 448 | "The Good, the Sad and the Drugly" 19/4/09 LABF07 20 17 437 6.5 45179 7.2 449 | Once Upon a Time in Springfield 10/1/10 LABF20 21 10 451 14.62 40194 6.7 450 | Bart Gets a 'Z' 4/10/09 LABF15 21 2 443 9.32 38196 6.6 451 | Eeny Teeny Maya Moe 5/4/09 LABF06 20 16 436 6.5 40864 7.2 452 | Chief of Hearts 18/4/10 MABF09 21 18 459 5.93 41528 6.9 453 | The Great Wife Hope 11/10/09 LABF16 21 3 444 7.5 39134 6.3 454 | To Surveil with Love 2/5/10 MABF12 21 20 461 6.06 45738 7.2 455 | The Scorpion's Tale 6/3/11 NABF08 22 15 479 6.2 42142 6.7 456 | The Blue and the Gray 13/2/11 no_val 22 13 477 5.61 42028 6.9 457 | The Color Yellow 21/2/10 MABF06 21 13 454 6.08 41059 6.6 458 | The Fool Monty 21/11/10 NABF01 22 6 470 6.58 38097 6.5 459 | "O Brother, Where Bart Thou?" 13/12/09 MABF01 21 8 449 7.11 38097 7.2 460 | Boy Meets Curl 14/2/10 MABF05 21 12 453 5.87 44945 6.8 461 | Love Is a Many Strangled Thing 27/3/11 NABF10 22 17 481 6.14 41202 6.5 462 | The Devil Wears Nada 15/11/09 LABF17 21 5 446 9.04 42893 6.7 463 | Homer Scissorhands 8/5/11 NABF13 22 20 484 5.48 46154 7.2 464 | Stealing First Base 21/3/10 MABF07 21 15 456 5.69 40487 7 465 | How Munched is That Birdie in the Window? 28/11/10 NABF02 22 7 471 9.38 37568 6.4 466 | The Real Housewives of Fat Tony 1/5/11 NABF12 22 19 483 6.1 41638 6.6 467 | Moms I'd Like to Forget 9/1/11 NABF03 22 10 474 12.6 41253 6.3 468 | MoneyBart 10/10/10 MABF18 22 3 467 6.72 39073 6.8 469 | Flaming Moe 16/1/11 NABF04 22 11 475 6.47 42734 6.9 470 | I'm with Cupid 14/2/99 AABF11 10 14 217 7.7 46822 7.3 471 | Bart Stops to Smell the Roosevelts 2/10/11 NABF17 23 2 488 6.19 37642 7 472 | Replaceable You 6/11/11 NABF21 23 4 490 7.97 38034 6.7 473 | The D'oh-cial Network 15/1/12 PABF04 23 11 497 11.48 43275 7 474 | Married to the Blob 12/1/14 SABF03 25 10 540 4.83 40646 7.1 475 | Ned 'n Edna's Blend 13/5/12 PABF15 23 21 507 4.07 47005 6.7 476 | Gone Abie Gone 11/11/12 PABF16 24 4 512 6.86 35136 6.7 477 | Homer Goes to Prep School 6/1/13 RABF02 24 9 517 8.97 42306 6.9 478 | Four Regrettings and a Funeral 3/11/13 RABF18 25 3 533 5.43 39301 6.5 479 | Yellow Subterfuge 8/12/13 SABF04 25 7 537 6.85 43717 7 480 | A Totally Fun Thing That Bart Will Never Do Again 29/4/12 PABF12 23 19 505 5 53058 7.4 481 | The Book Job 20/11/11 NABF22 23 6 492 5.77 42780 7.8 482 | The Daughter Also Rises 12/2/12 PABF06 23 13 499 4.26 40669 6.5 483 | Steal This Episode 5/1/14 SABF05 25 9 539 12.04 45354 7.6 484 | Exit Through the Kwik-E-Mart 4/3/12 PABF09 23 15 501 5.09 45133 6.9 485 | "Black Eyed, Please" 10/3/13 RABF09 24 15 523 4.85 42925 7 486 | "Them, Robot" 18/3/12 PABF10 23 17 503 5.25 43615 7.1 487 | Treehouse of Horror XXIV 6/10/13 RABF16 25 2 532 6.42 64758 7.1 488 | Pulpit Friction 28/4/13 RABF11 24 18 526 4.54 41184 6.5 489 | The Changing of the Guardian 27/1/13 RABF04 24 11 519 5.23 42215 6.6 490 | no_val 30/9/12 PABF21 24 1 509 8.08 36570 6.4 491 | A Tree Grows in Springfield 25/11/12 PABF22 24 6 514 7.46 43211 6.5 492 | Treehouse of Horror XXIII 7/10/12 no_val 24 2 510 6.57 67484 7.3 493 | The Day the Earth Stood Cool 9/12/12 PABF20 24 7 515 7.44 40649 7.2 494 | Hardly Kirk-ing 17/2/13 RABF05 24 13 521 4.57 42807 7 495 | The Fabulous Faker Boy 12/5/13 no_val 24 20 528 4.16 42426 6.3 496 | Labor Pains 17/11/13 RABF19 25 5 535 4.08 40671 7.1 497 | Dangers on a Train 19/5/13 RABF17 24 22 530 4.52 44984 7 498 | "Marge Simpson in: ""Screaming Yellow Honkers""" 21/2/99 AABF10 10 15 218 8.6 52778 7.3 499 | The Winter of His Content 16/3/14 SABF09 25 14 544 4.02 44271 6.6 500 | What to Expect When Bart's Expecting 27/4/14 SABF14 25 19 549 3.45 48760 5.8 501 | Covercraft 23/11/14 TABF02 26 8 560 3.45 38432 6.5 502 | Walking Big & Tall 8/2/15 TABF06 26 13 565 2.78 36221 6.3 503 | Treehouse of Horror XXVI 25/10/15 TABF18 27 5 579 6.75 195 6.8 504 | The Girl Code 3/1/16 VABF03 27 10 584 4.41 166 6.6 505 | Pay Pal 11/5/14 SABF15 25 21 551 3.66 51132 6.7 506 | Every Man's Dream 27/9/15 TABF14 27 1 575 3.28 187 5.9 507 | Let's Go Fly a Coot 3/5/15 TABF13 26 20 572 3.12 40783 6.2 508 | Waiting for Duffman 15/3/15 TABF10 26 17 569 3.59 37874 6.7 509 | Lisa with an 'S' 22/11/15 TABF20 27 7 581 5.64 145 6.3 510 | Bart's New Friend 11/1/15 TABF05 26 11 563 4.28 39702 7.3 511 | Love Is in the N2-O2-Ar-CO2-Ne-He-CH4 14/2/16 VABF07 27 13 587 2.89 158 6.3 512 | The Kids Are All Fight 26/4/15 TABF12 26 19 571 3.33 42123 6.9 513 | Sky Police 8/3/15 TABF09 26 16 568 3.79 43023 6.9 514 | Clown in the Dumps 28/9/14 SABF20 26 1 553 8.53 29526 5.8 515 | Super Franchise Me 12/10/14 no_val 26 3 555 7.33 42912 6.5 516 | Much Apu About Something 17/1/16 VABF05 27 12 586 3.95 170 6.7 517 | I Won't Be Home for Christmas 7/12/14 TABF03 26 9 561 6.52 37064 6.8 518 | Treehouse of Horror XXV 19/10/14 SABF21 26 4 556 7.76 65425 7.3 519 | My Fare Lady 15/2/15 TABF07 26 14 566 2.67 35846 6.7 520 | The Burns Cage 3/4/16 VABF10 27 17 591 2.32 190 6.5 521 | Mathlete's Feat 17/5/15 TABF16 26 22 574 2.82 47429 6.9 522 | Lisa the Veterinarian 6/3/16 VABF08 27 15 589 3.09 174 6.3 523 | Paths of Glory 6/12/15 VABF01 27 8 582 5.53 170 7.1 524 | no_val 11/10/15 TABF19 27 3 577 3.31 160 7.2 525 | Brush with Greatness 11/4/91 7F18 2 18 31 20.6 58561 8 526 | Flaming Moe's 21/11/91 8F08 3 10 45 23.9 58968 8.8 527 | Bart the General 4/2/90 7G05 1 5 5 27.1 63129 8.1 528 | "Brother, Can You Spare Two Dimes?" 27/8/92 8F23 3 24 59 17.2 50936 8.2 529 | Homer the Heretic 8/10/92 9F01 4 3 62 19.3 64605 9 530 | Cape Feare 7/10/93 9F22 5 2 83 20 65585 9 531 | Bart's Inner Child 11/11/93 1F05 5 7 88 18.7 74139 7.7 532 | Deep Space Homer 24/2/94 1F13 5 15 96 18.2 75439 8.8 533 | Sweet Seymour Skinner's Baadasssss Song 28/4/94 1F18 5 19 100 19.7 66406 8.4 534 | The Boy Who Knew Too Much 5/5/94 1F19 5 20 101 15.5 74427 8.2 535 | Treehouse of Horror V 30/10/94 2F03 6 6 109 22.2 119295 9 536 | Who Shot Mr. Burns? (Part One) 21/5/95 2F16 6 25 128 15 86070 9.1 537 | You Only Move Twice 3/11/96 3F23 8 2 155 13.9 79609 9.2 538 | El Viaje Misterioso de Nuestro Jomer (The Mysterious Voyage of Homer) 5/1/97 3F24 8 9 162 14.9 64743 8.5 539 | Homer's Enemy 4/5/97 4F19 8 23 176 11.8 74177 9.2 540 | Treehouse of Horror VIII 26/10/97 5F02 9 4 182 10.9 30963 8.1 541 | The Two Mrs. Nahasapeemapetilons 16/11/97 5F04 9 7 185 11.4 19419 7.7 542 | D'oh-in' in the Wind 15/11/98 AABF02 10 6 209 8.3 45779 7.6 543 | Skinner's Sense of Snow 17/12/00 CABF06 12 8 256 15.9 56755 8 544 | HOMR 7/1/01 BABF22 12 9 257 18.5 68784 8 545 | Trilogy of Error 29/4/01 no_val 12 18 266 14.4 53728 8.6 546 | Poppa's Got a Brand New Badge 22/5/02 DABF17 13 22 291 8.2 53639 8 547 | Treehouse of Horror XIII 3/11/02 DABF19 14 1 292 16.7 71817 7.6 548 | Holidays of Future Passed 11/12/11 NABF18 23 9 495 6.43 69460 8.2 549 | Simpsorama 9/11/14 SABF16 26 6 558 6.7 48223 7.9 550 | Halloween of Horror 18/10/15 TABF22 27 4 578 3.69 196 7.5 551 | To Courier with Love 8/5/16 VABF14 27 20 594 2.52 192 6.7 552 | Homer's Odyssey 21/1/90 7G03 1 3 3 27.5 78072 7.5 553 | no_val 19/12/99 BABF07 11 9 235 7.76 48070 7.3 554 | A Tale of Two Springfields 5/11/00 BABF20 12 2 250 16.2 40990 7.4 555 | Homer vs. Dignity 26/11/00 CABF04 12 5 253 15 44005 7.2 556 | The Old Man and the Key 10/3/02 DABF09 13 13 282 14.5 41049 6.5 557 | 'Scuse Me While I Miss the Sky 30/3/03 EABF11 14 16 307 12.6 43756 7.1 558 | Margical History Tour 8/2/04 FABF06 15 11 324 8.9 42492 7.1 559 | Mobile Homer 20/3/05 GABF07 16 13 348 8.49 45489 7 560 | Don't Fear the Roofer 1/5/05 GABF10 16 16 351 11.92 41620 7.4 561 | The Seemingly Never-Ending Story 12/3/06 no_val 17 13 369 9.72 48854 7.4 562 | "Homer Simpson, This Is Your Wife" 26/3/06 HABF08 17 15 371 10.09 41323 6.5 563 | The Wettest Stories Ever Told 23/4/06 HABF11 17 18 374 7.04 42280 6.7 564 | Midnight Towboy 7/10/07 JABF21 19 3 403 7.7 35926 7.2 565 | Homer and Lisa Exchange Cross Words 16/11/08 KABF19 20 6 426 8.52 38879 7.1 566 | Coming to Homerica 17/5/09 LABF12 20 21 441 5.86 6477 7.2 567 | Treehouse of Horror XX 18/10/09 LABF14 21 4 445 8.59 66209 7.3 568 | American History X-cellent 11/4/10 MABF08 21 17 458 5.65 44645 6.7 569 | The Squirt and the Whale 25/4/10 MABF14 21 19 460 5.94 40632 6.9 570 | Treehouse of Horror XXI 7/11/10 MABF16 22 4 468 8.19 61954 7.1 571 | The Man in the Blue Flannel Pants 27/11/11 PABF01 23 7 493 5.61 41687 6.8 572 | Dark Knight Court 17/3/13 RABF10 24 16 524 4.89 44170 7.1 573 | The Saga of Carl 19/5/13 RABF14 24 21 529 4.01 42996 7.2 574 | You Don't Have to Live Like a Referee 30/3/14 SABF11 25 16 546 3.91 42080 6.9 575 | The Princess Guide 1/3/15 TABF08 26 15 567 3.93 34137 6.6 576 | How Lisa Got Her Marge Back 10/4/16 VABF11 27 18 592 2.55 188 6.4 577 | Orange Is the New Yellow 22/5/16 VABF15 27 22 596 2.54 276 6.9 578 | no_val 25/9/16 VABF20 28 1 597 3.36 994 6.6 579 | New Kids on the Blecch 25/2/01 CABF12 12 14 262 18.1 50903 7.2 580 | Sweets and Sour Marge 20/1/02 DABF03 13 8 277 12.3 54348 7 581 | The Frying Game 19/5/02 DABF16 13 21 290 10.8 48954 7.1 582 | I'm Spelling As Fast As I Can 16/2/03 EABF07 14 12 303 22.1 42885 7.3 583 | A Star Is Born-Again 2/3/03 EABF08 14 13 304 14.4 42185 7.1 584 | The Regina Monologues 23/11/03 EABF22 15 4 317 12.2 43134 7.1 585 | "The Father, the Son, and the Holy Guest Star" 15/5/05 GABF09 16 21 356 9.69 48303 7.2 586 | Marge's Son Poisoning 13/11/05 GABF20 17 5 361 11.4 39428 6.9 587 | "Kiss Kiss, Bang Bangalore" 9/4/06 HABF10 17 17 373 8.2 47829 7.2 588 | Jazzy and the Pussycats 17/9/06 HABF18 18 2 380 8.94 33495 6.7 589 | He Loves to Fly and He D'ohs 23/9/07 JABF20 19 1 401 9.7 36253 6.7 590 | I Don't Wanna Know Why the Caged Bird Sings 14/10/07 JABF19 19 4 404 8.8 35850 6.9 591 | Eternal Moonshine of the Simpson Mind 16/12/07 KABF02 19 9 409 10.15 44862 8.2 592 | Lisa the Drama Queen 25/1/09 KABF22 20 9 429 5.75 38582 5.9 593 | How the Test Was Won 1/3/09 LABF02 20 11 431 6.52 41271 7 594 | In the Name of the Grandfather 22/3/09 LABF11 20 14 434 6.15 45727 6.3 595 | Wedding for Disaster 29/3/09 LABF05 20 15 435 6.58 43254 6.8 596 | The Ned-Liest Catch 22/5/11 NABF15 22 22 486 5.25 43681 7 597 | At Long Last Leave 19/2/12 PABF07 23 14 500 5.77 45226 7 598 | How I Wet Your Mother 11/3/12 PABF08 23 16 502 4.97 44818 7.3 599 | Adventures in Baby-Getting 4/11/12 PABF18 24 3 511 5.65 39687 6.9 600 | Diggs 9/3/14 SABF08 25 12 542 2.69 39292 6.4 601 | Days of Future Future 13/4/14 SABF13 25 18 548 3.64 55742 7 -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | col_names = ['Title', 'Air date', 'Production code', 'Season', 'Number in season', 5 | 'Number in series', 'US viewers (million)', 'Views', 'IMDB rating'] 6 | 7 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/solutions/solution_1.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | col_names = ['Title', 'Air date', 'Production code', 'Season', 'Number in season', 5 | 'Number in series', 'US viewers (million)', 'Views', 'IMDB rating'] 6 | 7 | select_cols = ['Title','Air date','Production code','IMDB rating'] 8 | 9 | simpsons = pd.read_csv('simpsons-episodes.tsv', 10 | sep='\t', 11 | encoding='UTF-8', 12 | names=col_names, 13 | usecols=select_cols, 14 | skiprows=4, 15 | index_col='Production code', 16 | na_values=['no_val'], 17 | parse_dates=['Air date']) 18 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/tests/test_simpsons_columns.py: -------------------------------------------------------------------------------- 1 | def test_simpsons_columns(): 2 | assert list(simpsons.columns) == ['Title', 'Air date', 'IMDB rating'] 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/tests/test_simpsons_item.py: -------------------------------------------------------------------------------- 1 | def test_simpsons_item(): 2 | assert simpsons.iloc[234, 2] == 6.6 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-4-tsv-with-the-simpsons-episodes/tests/test_simpsons_shape.py: -------------------------------------------------------------------------------- 1 | def test_simpsons_shape(): 2 | assert simpsons.shape == (597, 3) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-5-reading-excel-files/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "d9badd95-ba67-44b3-af29-6cc7986987d0" 3 | name = "Reading Excel files" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/reading-excel-files-a6b99973" 5 | youtube_id = "" 6 | jwplayer_media_id = "W7ZKWbwk" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-5-reading-excel-files/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-5-reading-excel-files/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-5-reading-excel-files/files/products.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-5-reading-excel-files/files/products.xlsx -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "08a87be3-ec3a-451a-8a8c-5a6bbf23c568" 3 | name = "Reading Playstore Apps Excel File" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/README.md: -------------------------------------------------------------------------------- 1 | # Load PlayStore Apps Excel file 2 | 3 | Read the `playstore.xlsx` Excel file from the given `data_url` and store it in a `playstore_df` DataFrame. 4 | 5 | - When reading in the file, only use the columns `'App', 'Rating', 'Installs', 'Rating', 'Genres', 'Last_Updated'`. 6 | - Make sure `Last_Updated` is in datetime format, try do this while reading the file into the DataFrame. 7 | 8 | After reading the data, filter the records and keep only the top 25 with highest `Rating` (being 5 the highest possible rating value). 9 | 10 | > This files originated as a CSV from Kaggle and has been altered for this course, https://www.kaggle.com/lava18/google-play-store-apps 11 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/files/playstore.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/files/playstore.xlsx -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | data_url = 'https://github.com/ine-rmotr-projects/project-files/files/4086772/playstore.xlsx' 5 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/solutions/solution_read_xlsx.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | data_url = 'https://github.com/ine-rmotr-projects/project-files/files/4086772/playstore.xlsx' 5 | 6 | playstore_df = pd.read_excel(data_url, 7 | parse_dates=['Last_Updated'], 8 | usecols=['App', 'Rating', 'Installs', 'Rating', 'Genres', 'Last_Updated']) 9 | 10 | playstore_df = playstore_df.sort_values('Rating', ascending=False).head(25) 11 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-6-reading-playstore-apps-excel-file/tests/test_last_updated_datetime.py: -------------------------------------------------------------------------------- 1 | def test_last_updated_datetime(): 2 | assert playstore_df['Last_Updated'].dtype == np.dtype(' This files originated as a CSV from Kaggle and has been altered for this course, https://www.kaggle.com/lava18/google-play-store-apps -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/files/playstore.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/files/playstore.xlsx -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | data_url = 'https://github.com/ine-rmotr-projects/project-files/files/4086772/playstore.xlsx' 5 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/solutions/solution_read_xlsx.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | data_url = 'https://github.com/ine-rmotr-projects/project-files/files/4086772/playstore.xlsx' 5 | 6 | file = pd.ExcelFile(data_url) 7 | 8 | playstore_df = file.parse(index_col=0) 9 | 10 | content_id_df = file.parse('Content_ID', 11 | index_col='Content_ID') -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/tests/test_content_id_1.py: -------------------------------------------------------------------------------- 1 | def test_content_id_1(): 2 | assert content_id_df.shape == (250,1) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/tests/test_content_id_2.py: -------------------------------------------------------------------------------- 1 | def test_content_id_2(): 2 | content_id_head = pd.DataFrame({'Content_Rating': ['Everyone', 'Everyone', 'Everyone', 'Teen', 'Everyone']}, 3 | index=[101, 101, 101, 102, 101]) 4 | 5 | assert content_id_df.head().equals(content_id_head) -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/tests/test_playstore_1.py: -------------------------------------------------------------------------------- 1 | def test_playstore_1(): 2 | assert playstore_df.shape == (250,9) 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-7-load-playstore-apps-excel-file-with-multiple-sheets/tests/test_playstore_2.py: -------------------------------------------------------------------------------- 1 | def test_playstore_2(): 2 | assert playstore_df.iloc[3]['App'] == 'Sketch - Draw & Paint' -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-8-reading-json-files/.rmotr: -------------------------------------------------------------------------------- 1 | type = "reading" 2 | uuid = "b6dff5ce-6399-42f1-8e89-06bca8b2ce79" 3 | name = "Reading JSON Files" 4 | notebooks_ai_project_url = "https://notebooks.ai/rmotr-curriculum/reading-json-files-bb8ba8ad" 5 | youtube_id = "" 6 | jwplayer_media_id = "xw1lakJv" -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-8-reading-json-files/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rmotr-curriculum/RDP-Reading-Data-with-Python-and-Pandas/3b9fbb0bba66837081fd9689a1b176c7b9f908ae/unit-1-reading-data-with-python-and-pandas/lesson-8-reading-json-files/README.md -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-8-reading-json-files/files/users.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": [ 3 | { 4 | "id": 1, 5 | "name": "Leanne Graham", 6 | "username": "Bret", 7 | "email": "Sincere@april.biz", 8 | "address": [{ 9 | "street": "Kulas Light", 10 | "suite": "Apt. 556", 11 | "city": "Gwenborough", 12 | "zipcode": "92998-3874", 13 | "geo": { 14 | "lat": "-37.3159", 15 | "lng": "81.1496" 16 | } 17 | }], 18 | "phone": "1-770-736-8031 x56442", 19 | "website": "hildegard.org", 20 | "company": { 21 | "name": "Romaguera-Crona", 22 | "catchPhrase": "Multi-layered client-server neural-net", 23 | "bs": "harness real-time e-markets" 24 | } 25 | }, 26 | { 27 | "id": 2, 28 | "name": "Ervin Howell", 29 | "username": "Antonette", 30 | "email": "Shanna@melissa.tv", 31 | "address": [{ 32 | "street": "Victor Plains", 33 | "suite": "Suite 879", 34 | "city": "Wisokyburgh", 35 | "zipcode": "90566-7771", 36 | "geo": { 37 | "lat": "-43.9509", 38 | "lng": "-34.4618" 39 | } 40 | }], 41 | "phone": "010-692-6593 x09125", 42 | "website": "anastasia.net", 43 | "company": { 44 | "name": "Deckow-Crist", 45 | "catchPhrase": "Proactive didactic contingency", 46 | "bs": "synergize scalable supply-chains" 47 | } 48 | }, 49 | { 50 | "id": 3, 51 | "name": "Clementine Bauch", 52 | "username": "Samantha", 53 | "email": "Nathan@yesenia.net", 54 | "address": [{ 55 | "street": "Douglas Extension", 56 | "suite": "Suite 847", 57 | "city": "McKenziehaven", 58 | "zipcode": "59590-4157", 59 | "geo": { 60 | "lat": "-68.6102", 61 | "lng": "-47.0653" 62 | } 63 | }], 64 | "phone": "1-463-123-4447", 65 | "website": "ramiro.info", 66 | "company": { 67 | "name": "Romaguera-Jacobson", 68 | "catchPhrase": "Face to face bifurcated interface", 69 | "bs": "e-enable strategic applications" 70 | } 71 | }, 72 | { 73 | "id": 4, 74 | "name": "Patricia Lebsack", 75 | "username": "Karianne", 76 | "email": "Julianne.OConner@kory.org", 77 | "address": [{ 78 | "street": "Hoeger Mall", 79 | "suite": "Apt. 692", 80 | "city": "South Elvis", 81 | "zipcode": "53919-4257", 82 | "geo": { 83 | "lat": "29.4572", 84 | "lng": "-164.2990" 85 | } 86 | }], 87 | "phone": "493-170-9623 x156", 88 | "website": "kale.biz", 89 | "company": { 90 | "name": "Robel-Corkery", 91 | "catchPhrase": "Multi-tiered zero tolerance productivity", 92 | "bs": "transition cutting-edge web services" 93 | } 94 | }, 95 | { 96 | "id": 5, 97 | "name": "Chelsey Dietrich", 98 | "username": "Kamren", 99 | "email": "Lucio_Hettinger@annie.ca", 100 | "address": [{ 101 | "street": "Skiles Walks", 102 | "suite": "Suite 351", 103 | "city": "Roscoeview", 104 | "zipcode": "33263", 105 | "geo": { 106 | "lat": "-31.8129", 107 | "lng": "62.5342" 108 | } 109 | }], 110 | "phone": "(254)954-1289", 111 | "website": "demarco.info", 112 | "company": { 113 | "name": "Keebler LLC", 114 | "catchPhrase": "User-centric fault-tolerant solution", 115 | "bs": "revolutionize end-to-end systems" 116 | } 117 | }, 118 | { 119 | "id": 6, 120 | "name": "Mrs. Dennis Schulist", 121 | "username": "Leopoldo_Corkery", 122 | "email": "Karley_Dach@jasper.info", 123 | "address": [{ 124 | "street": "Norberto Crossing", 125 | "suite": "Apt. 950", 126 | "city": "South Christy", 127 | "zipcode": "23505-1337", 128 | "geo": { 129 | "lat": "-71.4197", 130 | "lng": "71.7478" 131 | } 132 | }], 133 | "phone": "1-477-935-8478 x6430", 134 | "website": "ola.org", 135 | "company": { 136 | "name": "Considine-Lockman", 137 | "catchPhrase": "Synchronised bottom-line interface", 138 | "bs": "e-enable innovative applications" 139 | } 140 | }, 141 | { 142 | "id": 7, 143 | "name": "Kurtis Weissnat", 144 | "username": "Elwyn.Skiles", 145 | "email": "Telly.Hoeger@billy.biz", 146 | "address": [{ 147 | "street": "Rex Trail", 148 | "suite": "Suite 280", 149 | "city": "Howemouth", 150 | "zipcode": "58804-1099", 151 | "geo": { 152 | "lat": "24.8918", 153 | "lng": "21.8984" 154 | } 155 | }], 156 | "phone": "210.067.6132", 157 | "website": "elvis.io", 158 | "company": { 159 | "name": "Johns Group", 160 | "catchPhrase": "Configurable multimedia task-force", 161 | "bs": "generate enterprise e-tailers" 162 | } 163 | }, 164 | { 165 | "id": 8, 166 | "name": "Nicholas Runolfsdottir V", 167 | "username": "Maxime_Nienow", 168 | "email": "Sherwood@rosamond.me", 169 | "address": [{ 170 | "street": "Ellsworth Summit", 171 | "suite": "Suite 729", 172 | "city": "Aliyaview", 173 | "zipcode": "45169", 174 | "geo": { 175 | "lat": "-14.3990", 176 | "lng": "-120.7677" 177 | } 178 | }], 179 | "phone": "586.493.6943 x140", 180 | "website": "jacynthe.com", 181 | "company": { 182 | "name": "Abernathy Group", 183 | "catchPhrase": "Implemented secondary concept", 184 | "bs": "e-enable extensible e-tailers" 185 | } 186 | }, 187 | { 188 | "id": 9, 189 | "name": "Glenna Reichert", 190 | "username": "Delphine", 191 | "email": "Chaim_McDermott@dana.io", 192 | "address": [{ 193 | "street": "Dayna Park", 194 | "suite": "Suite 449", 195 | "city": "Bartholomebury", 196 | "zipcode": "76495-3109", 197 | "geo": { 198 | "lat": "24.6463", 199 | "lng": "-168.8889" 200 | } 201 | }], 202 | "phone": "(775)976-6794 x41206", 203 | "website": "conrad.com", 204 | "company": { 205 | "name": "Yost and Sons", 206 | "catchPhrase": "Switchable contextually-based project", 207 | "bs": "aggregate real-time technologies" 208 | } 209 | }, 210 | { 211 | "id": 10, 212 | "name": "Clementina DuBuque", 213 | "username": "Moriah.Stanton", 214 | "email": "Rey.Padberg@karina.biz", 215 | "address": [{ 216 | "street": "Kattie Turnpike", 217 | "suite": "Suite 198", 218 | "city": "Lebsackbury", 219 | "zipcode": "31428-2261", 220 | "geo": { 221 | "lat": "-38.2386", 222 | "lng": "57.2232" 223 | } 224 | }], 225 | "phone": "024-648-3804", 226 | "website": "ambrose.net", 227 | "company": { 228 | "name": "Hoeger LLC", 229 | "catchPhrase": "Centralized empowering task-force", 230 | "bs": "target end-to-end models" 231 | } 232 | } 233 | ] 234 | } -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/.rmotr: -------------------------------------------------------------------------------- 1 | type = "assignment" 2 | uuid = "3d575e8d-30a2-433f-b7c2-db958bde641b" 3 | name = "Parse artists JSON file" 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/README.md: -------------------------------------------------------------------------------- 1 | # Parsing artists JSON file 2 | 3 | This exercise will take a few steps to complete successfully. Have a look at the `artists.json` file before starting so you have an idea of the structure and information contained. 4 | 5 | - Read the `artists.json` into an `artists` DataFrame variable, without using `json_normalize`. 6 | - Remove the `bio` column. 7 | - Set the `name` column as index. 8 | - Save it as `artists.csv` keeping the index. 9 | 10 | > This JSON was originally a CSV file from Kaggle and has been altered for this course, https://www.kaggle.com/ikarus777/best-artworks-of-all-time -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/files/artists.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Amedeo Modigliani", 4 | "years": "1884 - 1920", 5 | "genre": "Expressionism", 6 | "nationality": "Italian", 7 | "bio": [ 8 | { 9 | "full name": "Amedeo Clemente Modigliani", 10 | "pronunciation": "[ame\u02c8d\u025b\u02d0o modi\u028e\u02c8\u028ea\u02d0ni]", 11 | "life span": "12 July 1884 \u2013 24 January 1920", 12 | "info": "was an Italian Jewish painter and sculptor who worked mainly in France. He is known for portraits and nudes in a modern style characterized by elongation of faces, necks, and figures that were not received well during his lifetime but later found acceptance. Modigliani spent his youth in Italy, where he studied the art of antiquity and the Renaissance. In 1906 he moved to Paris, where he came into contact with such artists as Pablo Picasso and Constantin Br\u00e2ncu\u0219i. By 1912 Modigliani was exhibiting highly stylized sculptures with Cubists of the Section d'Or group at the Salon d'Automne.", 13 | "wikipedia": "http://en.wikipedia.org/wiki/Amedeo_Modigliani", 14 | "paintings": 193 15 | } 16 | ] 17 | }, 18 | { 19 | "name": "Vasiliy Kandinskiy", 20 | "years": "1866 - 1944", 21 | "genre": "Expressionism,Abstractionism", 22 | "nationality": "Russian", 23 | "bio": [ 24 | { 25 | "full name": "Wassily Wassilyevich Kandinsky", 26 | "pronunciation": "\u0412\u0430\u0441\u0438\u0301\u043b\u0438\u0439 \u0412\u0430\u0441\u0438\u0301\u043b\u044c\u0435\u0432\u0438\u0447 \u041a\u0430\u043d\u0434\u0438\u0301\u043d\u0441\u043a\u0438\u0439, tr. Vas\u00edliy Vas\u00edl\u02b9evich Kand\u00ednskiy", 27 | "life span": "16 December [O.S. 4 December] 1866 \u2013 13 December 1944", 28 | "info": "was a Russian painter and art theorist.", 29 | "wikipedia": "http://en.wikipedia.org/wiki/Wassily_Kandinsky", 30 | "paintings": 88 31 | } 32 | ] 33 | }, 34 | { 35 | "name": "Diego Rivera", 36 | "years": "1886 - 1957", 37 | "genre": "Social Realism,Muralism", 38 | "nationality": "Mexican", 39 | "bio": [ 40 | { 41 | "full name": "Diego Mar\u00eda de la Concepci\u00f3n Juan Nepomuceno Estanislao de la Rivera y Barrientos Acosta y Rodr\u00edguez, known as Diego Rivera", 42 | "pronunciation": "[\u02c8dje\u0263o ri\u02c8\u03b2e\u027ea]", 43 | "life span": "December 8, 1886 \u2013 November 24, 1957", 44 | "info": "was a prominent Mexican painter. His large frescoes helped establish the Mexican mural movement in Mexican art. Between 1922 and 1953, Rivera painted murals in, among other places, Mexico City, Chapingo, Cuernavaca, San Francisco, Detroit, and New York City. In 1931, a retrospective exhibition of his works was held at the Museum of Modern Art in New York. Rivera had a volatile marriage with fellow Mexican artist Frida Kahlo.", 45 | "wikipedia": "http://en.wikipedia.org/wiki/Diego_Rivera", 46 | "paintings": 70 47 | } 48 | ] 49 | }, 50 | { 51 | "name": "Claude Monet", 52 | "years": "1840 - 1926", 53 | "genre": "Impressionism", 54 | "nationality": "French", 55 | "bio": [ 56 | { 57 | "full name": "Oscar-Claude Monet", 58 | "pronunciation": "[klod m\u0254n\u025b]", 59 | "life span": "14 November 1840 \u2013 5 December 1926", 60 | "info": "was a French painter, a founder of French Impressionist painting and the most consistent and prolific practitioner of the movement's philosophy of expressing one's perceptions before nature, especially as applied to plein air landscape painting. The term 'Impressionism' is derived from the title of his painting Impression, soleil levant (Impression, Sunrise), which was exhibited in 1874 in the first of the independent exhibitions mounted by Monet and his associates as an alternative to the Salon de Paris.Monet's ambition of documenting the French countryside led him to adopt a method of painting the same scene many times in order to capture the changing of light and the passing of the seasons. From 1883, Monet lived in Giverny, where he purchased a house and property and began a vast landscaping project which included lily ponds that would become the subjects of his best-known works. In 1899, he began painting the water lilies, first in vertical views with a Japanese bridge as a central feature and later in the series of large-scale paintings that was to occupy him continuously for the next 20 years of his life.", 61 | "wikipedia": "http://en.wikipedia.org/wiki/Claude_Monet", 62 | "paintings": 73 63 | } 64 | ] 65 | }, 66 | { 67 | "name": "Rene Magritte", 68 | "years": "1898 - 1967", 69 | "genre": "Surrealism,Impressionism", 70 | "nationality": "Belgian", 71 | "bio": [ 72 | { 73 | "full name": "Ren\u00e9 Fran\u00e7ois Ghislain Magritte", 74 | "pronunciation": "[\u0281\u0259ne f\u0281\u0251\u0303swa \u0261il\u025b\u0303 ma\u0261\u0281it]", 75 | "life span": "21 November 1898 \u2013 15 August 1967", 76 | "info": "Was a Belgian Surrealist artist. He became well known for creating a number of witty and thought-provoking images. Often depicting ordinary objects in an unusual context, his work is known for challenging observers' preconditioned perceptions of reality. His imagery has influenced Pop art, minimalist and conceptual art.", 77 | "wikipedia": "http://en.wikipedia.org/wiki/Ren\u00e9_Magritte", 78 | "paintings": 194 79 | } 80 | ] 81 | } 82 | ] 83 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/main.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/solutions/solution_read_json.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import pandas as pd 3 | 4 | artists = pd.read_json('artists.json') 5 | 6 | artists.drop(['bio'], axis='columns', inplace=True) 7 | 8 | artists.set_index('name', inplace=True) 9 | 10 | artists.to_csv('artists.csv') 11 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/tests/test_artists.py: -------------------------------------------------------------------------------- 1 | def test_artists(): 2 | assert artists.iloc[3]['genre'] == 'Impressionism' 3 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/tests/test_index.py: -------------------------------------------------------------------------------- 1 | def test_index(): 2 | i = pd.Index(['Amedeo Modigliani', 'Vasiliy Kandinskiy', 'Diego Rivera', 3 | 'Claude Monet', 'Rene Magritte']) 4 | 5 | assert artists.index.equals(i) 6 | -------------------------------------------------------------------------------- /unit-1-reading-data-with-python-and-pandas/lesson-9-parse-artists-json-file/tests/test_shape.py: -------------------------------------------------------------------------------- 1 | def test_shape(): 2 | assert artists.shape == (5, 3) 3 | --------------------------------------------------------------------------------