├── .DS_Store ├── .gitignore ├── LICENSE ├── README.md ├── advanced_notebook_checker.py ├── check_notebooks.py ├── extra ├── Chapter 01 Pandas Foundations1.ipynb ├── Chapter 02 Essential DataFrame Operations.ipynb ├── Chapter 03 Beginning Data Analysis.ipynb ├── Chapter 04 Selecting Subsets of Data.ipynb ├── Chapter 05 Boolean Indexing.ipynb ├── Chapter 06 Index Alignment.ipynb ├── Chapter 07 Grouping for Aggregation, Filtration and Transformation.ipynb ├── Chapter 08 Restructuring Data into Tidy Form.ipynb ├── Chapter 09 Combining Pandas Objects.ipynb ├── Chapter 10 Time Series Analysis.ipynb └── Chapter 11 Visualization with Matplotlib, Pandas and Seaborn.ipynb ├── fix_notebooks.py ├── notebooks ├── data │ ├── air_quality_long.csv │ ├── amzn_stock.csv │ ├── baseball14.csv │ ├── baseball15.csv │ ├── baseball16.csv │ ├── chinook.db │ ├── college.csv │ ├── college_data_dictionary.csv │ ├── college_diversity.csv │ ├── crime.h5 │ ├── denver_pop.csv │ ├── diamonds.csv │ ├── employee.csv │ ├── flights.csv │ ├── food_prices.csv │ ├── food_transactions.csv │ ├── gas prices │ │ ├── all grades.csv │ │ ├── diesel.csv │ │ ├── midgrade.csv │ │ ├── premium.csv │ │ └── regular.csv │ ├── iris.data │ ├── meetup_groups.csv │ ├── movie.csv │ ├── movie_altered.csv │ ├── names.csv │ ├── restaurant_inspections.csv │ ├── sensors.csv │ ├── slb_stock.csv │ ├── sql_cheat_sheet.jpeg │ ├── stackme.csv │ ├── state_fruit.csv │ ├── state_fruit2.csv │ ├── stocks_2016.csv │ ├── stocks_2017.csv │ ├── stocks_2018.csv │ ├── texas_cities.csv │ ├── tips.csv │ ├── titanic.csv │ ├── weight_loss.csv │ └── weightlifting_men.csv ├── fixed_width.txt ├── large_sample_data.csv ├── no_header.xlsx ├── part_001.ipynb ├── part_002.ipynb ├── part_003.ipynb ├── part_004.ipynb ├── part_005.ipynb ├── part_006.ipynb ├── part_007.ipynb ├── part_008.ipynb ├── part_009.ipynb ├── part_010.ipynb ├── part_011.ipynb ├── part_012.ipynb ├── part_013.ipynb ├── part_014.ipynb ├── part_015.ipynb ├── part_016.ipynb ├── part_017.ipynb ├── part_018.ipynb ├── part_019.ipynb ├── part_020.ipynb ├── part_021.ipynb ├── part_022.ipynb ├── part_023.ipynb ├── part_024.ipynb ├── part_025.ipynb ├── part_026.ipynb ├── part_027.ipynb ├── part_028.ipynb ├── part_029.ipynb ├── part_030.ipynb ├── part_031.ipynb ├── part_032.ipynb ├── part_033.ipynb ├── part_034.ipynb ├── part_035.ipynb ├── part_036.ipynb ├── part_037.ipynb ├── part_038.ipynb ├── part_039.ipynb ├── part_040.ipynb ├── part_041.ipynb ├── part_042.ipynb ├── part_043.ipynb ├── part_044.ipynb ├── part_045.ipynb ├── part_046.ipynb ├── part_047.ipynb ├── part_048.ipynb ├── part_049.ipynb ├── part_050.ipynb ├── part_051.ipynb ├── part_052.ipynb ├── part_053.ipynb ├── part_054.ipynb ├── part_055.ipynb ├── part_056.ipynb ├── part_057.ipynb ├── part_058.ipynb ├── part_059.ipynb ├── part_060.ipynb ├── part_061.ipynb ├── part_062.ipynb ├── part_063.ipynb ├── part_064.ipynb ├── part_065.ipynb ├── part_066.ipynb ├── part_067.ipynb ├── part_068.ipynb ├── part_069.ipynb ├── part_070.ipynb ├── part_071.ipynb ├── part_072.ipynb ├── part_073.ipynb ├── part_074.ipynb ├── part_075.ipynb ├── part_076.ipynb ├── part_077.ipynb ├── part_078.ipynb ├── part_079.ipynb ├── part_080.ipynb ├── part_081.ipynb ├── part_082.ipynb ├── part_083.ipynb ├── part_084.ipynb ├── part_085.ipynb ├── part_086.ipynb ├── part_087.ipynb ├── part_088.ipynb ├── part_089.ipynb ├── part_090.ipynb ├── part_091.ipynb ├── part_092.ipynb ├── part_093.ipynb ├── part_094.ipynb ├── part_095.ipynb ├── part_096.ipynb └── part_097.ipynb ├── pandas_pdf ├── pandas.pdf ├── part_001.pdf ├── part_002.pdf ├── part_003.pdf ├── part_004.pdf ├── part_005.pdf ├── part_006.pdf ├── part_007.pdf ├── part_008.pdf ├── part_009.pdf ├── part_010.pdf ├── part_011.pdf ├── part_012.pdf ├── part_013.pdf ├── part_014.pdf ├── part_015.pdf ├── part_016.pdf ├── part_017.pdf ├── part_018.pdf ├── part_019.pdf ├── part_020.pdf ├── part_021.pdf ├── part_022.pdf ├── part_023.pdf ├── part_024.pdf ├── part_025.pdf ├── part_026.pdf ├── part_027.pdf ├── part_028.pdf ├── part_029.pdf ├── part_030.pdf ├── part_031.pdf ├── part_032.pdf ├── part_033.pdf ├── part_034.pdf ├── part_035.pdf ├── part_036.pdf ├── part_037.pdf ├── part_038.pdf ├── part_039.pdf ├── part_040.pdf ├── part_041.pdf ├── part_042.pdf ├── part_043.pdf ├── part_044.pdf ├── part_045.pdf ├── part_046.pdf ├── part_047.pdf ├── part_048.pdf ├── part_049.pdf ├── part_050.pdf ├── part_051.pdf ├── part_052.pdf ├── part_053.pdf ├── part_054.pdf ├── part_055.pdf ├── part_056.pdf ├── part_057.pdf ├── part_058.pdf ├── part_059.pdf ├── part_060.pdf ├── part_061.pdf ├── part_062.pdf ├── part_063.pdf ├── part_064.pdf ├── part_065.pdf ├── part_066.pdf ├── part_067.pdf ├── part_068.pdf ├── part_069.pdf ├── part_070.pdf ├── part_071.pdf ├── part_072.pdf ├── part_073.pdf ├── part_074.pdf ├── part_075.pdf ├── part_076.pdf ├── part_077.pdf ├── part_078.pdf ├── part_079.pdf ├── part_080.pdf ├── part_081.pdf ├── part_082.pdf ├── part_083.pdf ├── part_084.pdf ├── part_085.pdf ├── part_086.pdf ├── part_087.pdf ├── part_088.pdf ├── part_089.pdf ├── part_090.pdf ├── part_091.pdf ├── part_092.pdf ├── part_093.pdf ├── part_094.pdf ├── part_095.pdf ├── part_096.pdf ├── part_097.pdf ├── part_098.pdf ├── part_099.pdf ├── part_100.pdf ├── part_101.pdf ├── part_102.pdf ├── part_103.pdf ├── part_104.pdf ├── part_105.pdf ├── part_106.pdf ├── part_107.pdf ├── part_108.pdf ├── part_109.pdf ├── part_110.pdf ├── part_111.pdf ├── part_112.pdf ├── part_113.pdf ├── part_114.pdf ├── part_115.pdf ├── part_116.pdf ├── part_117.pdf ├── part_118.pdf ├── part_119.pdf ├── part_120.pdf ├── part_121.pdf ├── part_122.pdf ├── part_123.pdf └── part_124.pdf └── requirements.txt /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Python virtual environment 2 | venv/ 3 | env/ 4 | .env/ 5 | 6 | # Utility scripts 7 | utilities/ 8 | 9 | 10 | # Jupyter Notebook 11 | .ipynb_checkpoints 12 | 13 | # Python bytecode 14 | __pycache__/ 15 | *.py[cod] 16 | *$py.class 17 | 18 | # Distribution / packaging 19 | dist/ 20 | build/ 21 | *.egg-info/ 22 | 23 | # Logs 24 | *.log 25 | 26 | # OS specific files 27 | .DS_Store 28 | Thumbs.db 29 | 30 | # IDE specific files 31 | .idea/ 32 | .vscode/ 33 | *.swp 34 | *.swo 35 | 36 | # Build and Release Folders 37 | bin-debug/ 38 | bin-release/ 39 | [Oo]bj/ 40 | [Bb]in/ 41 | 42 | # Other files and folders 43 | .settings/ 44 | 45 | # Specific data files 46 | notebooks/fixed_width.txt 47 | notebooks/large_sample_data.csv 48 | notebooks/no_header.xlsx 49 | notebooks/rename_notebooks.sh 50 | notebooks/sample_data.csv 51 | notebooks/sample_data.xlsx 52 | notebooks/sample_multi_sheet.xlsx 53 | notebooks/sample.csv 54 | notebooks/sample.dta 55 | notebooks/sample.h5 56 | notebooks/sample.html 57 | notebooks/sample.json 58 | notebooks/sample.parquet 59 | notebooks/sample.pkl 60 | notebooks/styled_dataframe.html 61 | 62 | # Notebook checking scripts 63 | check_notebooks.py 64 | fix_notebooks.py 65 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Pandas Tutorial: Essential Functions for Data Analysis 2 | 3 | Welcome to the Pandas Tutorial! This project breaks down the official [pandas documentation](https://pandas.pydata.org/pandas-docs/version/1.4/pandas.pdf) into simple, easy-to-understand Jupyter notebooks. I took that PDF and broke down in sections of approximately 25 pages each. Each notebook focuses on specific pandas functions found within these sections. They are stored in the [pandas_pdf](./pandas_pdf) directory. 4 | 5 | ### How It's Organized 6 | 7 | - Each notebook is named `part_XXX.ipynb` where `XXX` represents the section number 8 | - Every notebook covers specific pandas functions with simple examples 9 | - All examples include clear explanations with minimal technical jargon 10 | - Code is ready to run and experiment with. Note: some functions may not be implemented yet since this is not the exact PDF version. 11 | 12 | ### What You'll Learn 13 | 14 | - How to create and manipulate DataFrames and Series 15 | - Essential data cleaning and transformation techniques 16 | - Data analysis methods with practical examples 17 | - Visualization techniques using pandas 18 | - Time series analysis capabilities 19 | - Advanced pandas features for real-world data tasks 20 | 21 | ### Folder Structure 22 | 23 | - notebooks/ 24 | - part_XXX.ipynb - Jupyter notebooks with pandas examples and explanations 25 | - pandas_pdf/ 26 | - part_XXX.pdf - Original PDF sections from the pandas documentation 27 | - pandas.pdf - The complete pandas documentation PDF 28 | 29 | ### How to Use This Tutorial 30 | 31 | 1. Clone this repository 32 | 2. Set up a virtual environment and install dependencies: 33 | ```bash 34 | # Create a virtual environment 35 | python -m venv venv 36 | 37 | # Activate the virtual environment 38 | # On macOS/Linux: 39 | source venv/bin/activate 40 | # On Windows: 41 | # venv\Scripts\activate 42 | 43 | # Install required packages 44 | pip install -r requirements.txt 45 | ``` 46 | 3. Start Jupyter Notebook: 47 | ```bash 48 | jupyter notebook 49 | ``` 50 | 4. Start with `part_001.ipynb` and progress through the numbered notebooks 51 | 5. Run the code cells to see the functions in action 52 | 6. Modify examples to experiment with your own data 53 | 54 | Each notebook is designed to be independent, so you can also jump to specific topics you're interested in. 55 | 56 | ### Key Topics Covered 57 | 58 | - DataFrame and Series creation and manipulation 59 | - Data selection, filtering and cleaning 60 | - Grouping, aggregation and pivoting 61 | - Time series analysis 62 | - Data visualization 63 | - Advanced pandas features 64 | 65 | ### How to Contribute 66 | 67 | If you see a gap in the tutorial, or can improve any of the examples, please open a pull request. 68 | 69 | ### License 70 | 71 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 72 | 73 | Enjoy learning pandas in a simple, practical way! 74 | -------------------------------------------------------------------------------- /advanced_notebook_checker.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Advanced script to check Jupyter notebooks for common issues with pandas and file paths. 4 | """ 5 | 6 | import json 7 | import os 8 | import re 9 | import sys 10 | from pathlib import Path 11 | import pandas as pd 12 | 13 | def check_notebook_for_issues(notebook_path): 14 | """Check a notebook for common issues and suggest fixes.""" 15 | print(f"\nChecking notebook: {notebook_path}") 16 | 17 | with open(notebook_path, 'r', encoding='utf-8') as f: 18 | notebook = json.load(f) 19 | 20 | issues = [] 21 | 22 | # Check for cells with code 23 | for i, cell in enumerate(notebook['cells']): 24 | if cell['cell_type'] == 'code': 25 | source = ''.join(cell['source']) 26 | 27 | # Check for deprecated pandas methods 28 | deprecated_methods = [ 29 | ('get_dtype_counts()', 'dtypes.value_counts()'), 30 | ('append(', 'concat([df1, df2], ignore_index=True)'), 31 | ('ix[', 'loc[ or iloc['), 32 | ('as_matrix()', 'to_numpy()'), 33 | ('read_table(', 'read_csv('), 34 | ('convert_objects(', 'astype()'), 35 | ('pd.TimeGrouper(', 'pd.Grouper(freq='), 36 | ('pd.SparseDataFrame(', 'pd.DataFrame(...).sparse.from_spmatrix('), 37 | ('pd.SparseSeries(', 'pd.Series(..., dtype="Sparse")'), 38 | ('pd.Panel(', 'Use MultiIndex DataFrame instead'), 39 | ('pd.scatter_matrix(', 'pd.plotting.scatter_matrix('), 40 | ('pd.tools.plotting.', 'pd.plotting.'), 41 | ('pd.tseries.plotting.', 'pd.plotting.'), 42 | ('pd.stats.', 'Use statsmodels instead'), 43 | ('pd.rolling_', 'df.rolling().'), 44 | ('pd.expanding_', 'df.expanding().'), 45 | ('pd.ewma(', 'df.ewm().mean()'), 46 | ('pd.ewmstd(', 'df.ewm().std()'), 47 | ('pd.ewmvar(', 'df.ewm().var()'), 48 | ('pd.ewmcorr(', 'df.ewm().corr()'), 49 | ('pd.ewmcov(', 'df.ewm().cov()'), 50 | ('isnull()', 'isna()'), 51 | ('notnull()', 'notna()'), 52 | ('pd.TimeGrouper(', 'pd.Grouper(freq='), 53 | ('sort(', 'sort_values('), 54 | ('sort_index(inplace=True)', 'sort_index()'), 55 | ('sort_values(inplace=True)', 'sort_values()'), 56 | ('reset_index(inplace=True)', 'reset_index()'), 57 | ('set_index(inplace=True)', 'set_index()'), 58 | ('fillna(inplace=True)', 'fillna()'), 59 | ('dropna(inplace=True)', 'dropna()'), 60 | ('drop(inplace=True)', 'drop()'), 61 | ('rename(inplace=True)', 'rename()'), 62 | ('replace(inplace=True)', 'replace()'), 63 | ] 64 | 65 | for old, new in deprecated_methods: 66 | if old in source: 67 | issues.append({ 68 | 'cell_index': i, 69 | 'issue': f'Deprecated method: {old}', 70 | 'fix': f'Replace with: {new}', 71 | 'code': source, 72 | 'severity': 'high' 73 | }) 74 | 75 | # Check for file path issues 76 | file_path_patterns = [ 77 | r"pd\.read_csv\(['\"]([^'\"]+)['\"]", 78 | r"pd\.read_excel\(['\"]([^'\"]+)['\"]", 79 | r"pd\.read_parquet\(['\"]([^'\"]+)['\"]", 80 | r"pd\.read_hdf\(['\"]([^'\"]+)['\"]", 81 | r"pd\.read_pickle\(['\"]([^'\"]+)['\"]", 82 | r"pd\.read_json\(['\"]([^'\"]+)['\"]", 83 | r"pd\.read_html\(['\"]([^'\"]+)['\"]", 84 | r"pd\.read_sas\(['\"]([^'\"]+)['\"]", 85 | r"pd\.read_stata\(['\"]([^'\"]+)['\"]", 86 | r"pd\.read_feather\(['\"]([^'\"]+)['\"]", 87 | r"pd\.read_spss\(['\"]([^'\"]+)['\"]", 88 | r"pd\.read_orc\(['\"]([^'\"]+)['\"]", 89 | r"pd\.read_sql\(['\"]([^'\"]+)['\"]", 90 | r"open\(['\"]([^'\"]+)['\"]", 91 | r"with open\(['\"]([^'\"]+)['\"]", 92 | r"os\.path\.join\(['\"]([^'\"]+)['\"]", 93 | r"Path\(['\"]([^'\"]+)['\"]", 94 | ] 95 | 96 | for pattern in file_path_patterns: 97 | matches = re.finditer(pattern, source) 98 | for match in matches: 99 | file_path = match.group(1) 100 | # Skip URLs and variable references 101 | if file_path.startswith(('http://', 'https://', 'ftp://', '{', '$')): 102 | continue 103 | 104 | # Skip paths that are clearly variables 105 | if not any(char in file_path for char in ['/', '\\', '.']): 106 | continue 107 | 108 | # Check if the file path exists relative to the notebook 109 | notebook_dir = os.path.dirname(notebook_path) 110 | full_path = os.path.join(notebook_dir, file_path) 111 | if not os.path.exists(full_path) and not file_path.startswith('/'): 112 | issues.append({ 113 | 'cell_index': i, 114 | 'issue': f'File path may not exist: {file_path}', 115 | 'fix': 'Update path or create the file', 116 | 'code': source, 117 | 'severity': 'medium' 118 | }) 119 | 120 | # Check for pandas set_option issues 121 | set_option_match = re.search(r"pd\.set_option\(['\"]([^'\"]+)['\"]", source) 122 | if set_option_match: 123 | option = set_option_match.group(1) 124 | if not option.startswith('display.'): 125 | issues.append({ 126 | 'cell_index': i, 127 | 'issue': f"Missing 'display.' prefix in option: {option}", 128 | 'fix': f"Add 'display.' prefix: 'display.{option}'", 129 | 'code': source, 130 | 'severity': 'medium' 131 | }) 132 | 133 | # Check for multiple options in pd.set_option 134 | set_option_multiple = re.search(r"pd\.set_option\([^,]+,[^,]+,[^,]+", source) 135 | if set_option_multiple: 136 | issues.append({ 137 | 'cell_index': i, 138 | 'issue': 'Multiple options in pd.set_option()', 139 | 'fix': 'Split into separate calls', 140 | 'code': source, 141 | 'severity': 'high' 142 | }) 143 | 144 | # Check for unsupported operations 145 | list_subtraction = re.search(r'\[[^\]]*\]\s*-\s*\d+', source) 146 | if list_subtraction: 147 | match = list_subtraction.group(0) 148 | issues.append({ 149 | 'cell_index': i, 150 | 'issue': f'Unsupported operation: {match}', 151 | 'fix': 'Use list comprehension or numpy array', 152 | 'code': source, 153 | 'severity': 'high' 154 | }) 155 | 156 | # Check for pandas version-specific code 157 | if 'pd.__version__' in source or 'pandas.__version__' in source: 158 | issues.append({ 159 | 'cell_index': i, 160 | 'issue': 'Version-specific code detected', 161 | 'fix': f'Current pandas version: {pd.__version__}. May need updates.', 162 | 'code': source, 163 | 'severity': 'low' 164 | }) 165 | 166 | return issues 167 | 168 | def main(): 169 | """Main function to check all notebooks in a directory.""" 170 | if len(sys.argv) < 2: 171 | print("Usage: python advanced_notebook_checker.py ") 172 | sys.exit(1) 173 | 174 | directory = sys.argv[1] 175 | 176 | if not os.path.isdir(directory): 177 | print(f"Error: {directory} is not a directory") 178 | sys.exit(1) 179 | 180 | notebooks = list(Path(directory).glob('*.ipynb')) 181 | 182 | if not notebooks: 183 | print(f"No notebooks found in {directory}") 184 | sys.exit(0) 185 | 186 | print(f"Found {len(notebooks)} notebooks in {directory}") 187 | print(f"Current pandas version: {pd.__version__}") 188 | 189 | all_issues = {} 190 | total_high_severity = 0 191 | total_medium_severity = 0 192 | total_low_severity = 0 193 | 194 | for notebook in notebooks: 195 | issues = check_notebook_for_issues(str(notebook)) 196 | if issues: 197 | all_issues[str(notebook)] = issues 198 | high_severity = sum(1 for issue in issues if issue['severity'] == 'high') 199 | medium_severity = sum(1 for issue in issues if issue['severity'] == 'medium') 200 | low_severity = sum(1 for issue in issues if issue['severity'] == 'low') 201 | total_high_severity += high_severity 202 | total_medium_severity += medium_severity 203 | total_low_severity += low_severity 204 | 205 | if all_issues: 206 | print("\n\n===== SUMMARY OF ISSUES =====") 207 | print(f"Total issues: {total_high_severity + total_medium_severity + total_low_severity}") 208 | print(f"High severity issues: {total_high_severity}") 209 | print(f"Medium severity issues: {total_medium_severity}") 210 | print(f"Low severity issues: {total_low_severity}") 211 | 212 | for notebook, issues in all_issues.items(): 213 | print(f"\n{notebook}: {len(issues)} issues found") 214 | high_severity = [issue for issue in issues if issue['severity'] == 'high'] 215 | medium_severity = [issue for issue in issues if issue['severity'] == 'medium'] 216 | low_severity = [issue for issue in issues if issue['severity'] == 'low'] 217 | 218 | if high_severity: 219 | print(" HIGH SEVERITY ISSUES:") 220 | for i, issue in enumerate(high_severity): 221 | print(f" {i+1}. Cell {issue['cell_index']}: {issue['issue']}") 222 | print(f" Fix: {issue['fix']}") 223 | 224 | if medium_severity: 225 | print(" MEDIUM SEVERITY ISSUES:") 226 | for i, issue in enumerate(medium_severity): 227 | print(f" {i+1}. Cell {issue['cell_index']}: {issue['issue']}") 228 | print(f" Fix: {issue['fix']}") 229 | 230 | if low_severity: 231 | print(" LOW SEVERITY ISSUES:") 232 | for i, issue in enumerate(low_severity): 233 | print(f" {i+1}. Cell {issue['cell_index']}: {issue['issue']}") 234 | print(f" Fix: {issue['fix']}") 235 | else: 236 | print("\nNo issues found in any notebooks!") 237 | 238 | if __name__ == "__main__": 239 | main() 240 | -------------------------------------------------------------------------------- /check_notebooks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Script to check Jupyter notebooks for common errors and provide fixes. 4 | """ 5 | 6 | import json 7 | import os 8 | import re 9 | import sys 10 | from pathlib import Path 11 | 12 | def check_notebook(notebook_path): 13 | """Check a notebook for common issues and suggest fixes.""" 14 | print(f"\nChecking notebook: {notebook_path}") 15 | 16 | with open(notebook_path, 'r', encoding='utf-8') as f: 17 | notebook = json.load(f) 18 | 19 | issues = [] 20 | 21 | # Check for cells with code 22 | for i, cell in enumerate(notebook['cells']): 23 | if cell['cell_type'] == 'code': 24 | source = ''.join(cell['source']) 25 | 26 | # Check for deprecated pandas methods 27 | if 'get_dtype_counts()' in source: 28 | issues.append({ 29 | 'cell_index': i, 30 | 'issue': 'Deprecated method: get_dtype_counts()', 31 | 'fix': 'Replace with: dtypes.value_counts()', 32 | 'code': source, 33 | 'fixed_code': source.replace('get_dtype_counts()', 'dtypes.value_counts()') 34 | }) 35 | 36 | # Check for list subtraction 37 | list_subtraction = re.search(r'\[[^\]]*\]\s*-\s*\d+', source) 38 | if list_subtraction: 39 | match = list_subtraction.group(0) 40 | list_part = re.search(r'\[[^\]]*\]', match).group(0) 41 | num_part = re.search(r'\d+', match.split('-')[1]).group(0) 42 | issues.append({ 43 | 'cell_index': i, 44 | 'issue': f'Unsupported operation: {match}', 45 | 'fix': f'Replace with: [x - {num_part} for x in {list_part}] or np.array({list_part}) - {num_part}', 46 | 'code': source, 47 | 'fixed_code': source.replace(match, f'[x - {num_part} for x in {list_part}]') 48 | }) 49 | 50 | # Check for pd.set_option with multiple options 51 | set_option_match = re.search(r"pd\.set_option\(['\"]([^'\"]+)['\"],\s*[^,]+,\s*['\"]([^'\"]+)['\"]", source) 52 | if set_option_match: 53 | opt1 = set_option_match.group(1) 54 | opt2 = re.search(r"pd\.set_option\([^,]+,\s*[^,]+,\s*['\"]([^'\"]+)['\"]", source).group(1) 55 | val1 = re.search(r"pd\.set_option\([^,]+,\s*([^,]+),", source).group(1) 56 | val2 = re.search(r"pd\.set_option\([^,]+,\s*[^,]+,\s*[^,]+,\s*([^)]+)", source).group(1) 57 | 58 | # Check if display. prefix is missing 59 | if not opt1.startswith('display.'): 60 | opt1 = f'display.{opt1}' 61 | if not opt2.startswith('display.'): 62 | opt2 = f'display.{opt2}' 63 | 64 | fix = f"pd.set_option('{opt1}', {val1})\npd.set_option('{opt2}', {val2})" 65 | issues.append({ 66 | 'cell_index': i, 67 | 'issue': 'Multiple options in pd.set_option()', 68 | 'fix': 'Split into separate calls', 69 | 'code': source, 70 | 'fixed_code': source.replace(set_option_match.group(0), fix) 71 | }) 72 | 73 | # Check for missing display. prefix in pd.set_option 74 | set_option_single = re.search(r"pd\.set_option\(['\"](?!display\.)([^'\"]+)['\"]", source) 75 | if set_option_single and not set_option_match: 76 | opt = set_option_single.group(1) 77 | fixed = source.replace(f"'{opt}'", f"'display.{opt}'") 78 | issues.append({ 79 | 'cell_index': i, 80 | 'issue': f"Missing 'display.' prefix in option: {opt}", 81 | 'fix': f"Add 'display.' prefix: 'display.{opt}'", 82 | 'code': source, 83 | 'fixed_code': fixed 84 | }) 85 | 86 | return issues 87 | 88 | def main(): 89 | """Main function to check all notebooks in a directory.""" 90 | if len(sys.argv) < 2: 91 | print("Usage: python check_notebooks.py ") 92 | sys.exit(1) 93 | 94 | directory = sys.argv[1] 95 | 96 | if not os.path.isdir(directory): 97 | print(f"Error: {directory} is not a directory") 98 | sys.exit(1) 99 | 100 | notebooks = list(Path(directory).glob('*.ipynb')) 101 | 102 | if not notebooks: 103 | print(f"No notebooks found in {directory}") 104 | sys.exit(0) 105 | 106 | print(f"Found {len(notebooks)} notebooks in {directory}") 107 | 108 | all_issues = {} 109 | 110 | for notebook in notebooks: 111 | issues = check_notebook(str(notebook)) 112 | if issues: 113 | all_issues[str(notebook)] = issues 114 | 115 | if all_issues: 116 | print("\n\n===== SUMMARY OF ISSUES =====") 117 | for notebook, issues in all_issues.items(): 118 | print(f"\n{notebook}: {len(issues)} issues found") 119 | for i, issue in enumerate(issues): 120 | print(f" {i+1}. Cell {issue['cell_index']}: {issue['issue']}") 121 | print(f" Fix: {issue['fix']}") 122 | print(f" Original code: {issue['code'].strip()}") 123 | print(f" Fixed code: {issue['fixed_code'].strip()}") 124 | else: 125 | print("\nNo issues found in any notebooks!") 126 | 127 | if __name__ == "__main__": 128 | main() 129 | -------------------------------------------------------------------------------- /fix_notebooks.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """ 3 | Script to fix common issues in Jupyter notebooks. 4 | """ 5 | 6 | import json 7 | import os 8 | import re 9 | import sys 10 | from pathlib import Path 11 | import shutil 12 | 13 | def fix_notebook(notebook_path): 14 | """Fix common issues in a notebook and save the changes.""" 15 | print(f"\nFixing notebook: {notebook_path}") 16 | 17 | # Create a backup of the original file 18 | backup_path = f"{notebook_path}.bak" 19 | shutil.copy2(notebook_path, backup_path) 20 | print(f"Created backup at: {backup_path}") 21 | 22 | with open(notebook_path, 'r', encoding='utf-8') as f: 23 | notebook = json.load(f) 24 | 25 | fixes_made = 0 26 | 27 | # Fix cells with code 28 | for i, cell in enumerate(notebook['cells']): 29 | if cell['cell_type'] == 'code': 30 | source = ''.join(cell['source']) 31 | original_source = source 32 | 33 | # Fix deprecated pandas methods 34 | if 'get_dtype_counts()' in source: 35 | source = source.replace('get_dtype_counts()', 'dtypes.value_counts()') 36 | fixes_made += 1 37 | print(f" Fixed: Replaced 'get_dtype_counts()' with 'dtypes.value_counts()' in cell {i}") 38 | 39 | # Fix list subtraction 40 | list_subtraction = re.search(r'\[[^\]]*\]\s*-\s*\d+', source) 41 | if list_subtraction: 42 | match = list_subtraction.group(0) 43 | list_part = re.search(r'\[[^\]]*\]', match).group(0) 44 | num_part = re.search(r'\d+', match.split('-')[1]).group(0) 45 | replacement = f'np.array({list_part}) - {num_part}' 46 | source = source.replace(match, replacement) 47 | fixes_made += 1 48 | print(f" Fixed: Replaced '{match}' with '{replacement}' in cell {i}") 49 | 50 | # Fix pd.set_option with multiple options 51 | set_option_match = re.search(r"pd\.set_option\(['\"]([^'\"]+)['\"],\s*([^,]+),\s*['\"]([^'\"]+)['\"],\s*([^)]+)\)", source) 52 | if set_option_match: 53 | opt1 = set_option_match.group(1) 54 | val1 = set_option_match.group(2) 55 | opt2 = set_option_match.group(3) 56 | val2 = set_option_match.group(4) 57 | 58 | # Add display. prefix if missing 59 | if not opt1.startswith('display.'): 60 | opt1 = f'display.{opt1}' 61 | if not opt2.startswith('display.'): 62 | opt2 = f'display.{opt2}' 63 | 64 | replacement = f"pd.set_option('{opt1}', {val1})\npd.set_option('{opt2}', {val2})" 65 | source = source.replace(set_option_match.group(0), replacement) 66 | fixes_made += 1 67 | print(f" Fixed: Split multiple pd.set_option calls in cell {i}") 68 | 69 | # Fix missing display. prefix in pd.set_option 70 | set_option_single = re.search(r"pd\.set_option\(['\"](?!display\.)([^'\"]+)['\"]", source) 71 | if set_option_single and not set_option_match: 72 | opt = set_option_single.group(1) 73 | source = source.replace(f"'{opt}'", f"'display.{opt}'") 74 | fixes_made += 1 75 | print(f" Fixed: Added 'display.' prefix to '{opt}' in cell {i}") 76 | 77 | # Update the cell source if changes were made 78 | if source != original_source: 79 | notebook['cells'][i]['source'] = [source] 80 | 81 | if fixes_made > 0: 82 | # Save the updated notebook 83 | with open(notebook_path, 'w', encoding='utf-8') as f: 84 | json.dump(notebook, f, indent=1) 85 | print(f"Made {fixes_made} fixes to {notebook_path}") 86 | else: 87 | print(f"No issues to fix in {notebook_path}") 88 | # Remove the backup if no changes were made 89 | os.remove(backup_path) 90 | print(f"Removed unnecessary backup: {backup_path}") 91 | 92 | return fixes_made 93 | 94 | def main(): 95 | """Main function to fix all notebooks in a directory.""" 96 | if len(sys.argv) < 2: 97 | print("Usage: python fix_notebooks.py ") 98 | sys.exit(1) 99 | 100 | directory = sys.argv[1] 101 | 102 | if not os.path.isdir(directory): 103 | print(f"Error: {directory} is not a directory") 104 | sys.exit(1) 105 | 106 | notebooks = list(Path(directory).glob('*.ipynb')) 107 | 108 | if not notebooks: 109 | print(f"No notebooks found in {directory}") 110 | sys.exit(0) 111 | 112 | print(f"Found {len(notebooks)} notebooks in {directory}") 113 | 114 | total_fixes = 0 115 | fixed_notebooks = 0 116 | 117 | for notebook in notebooks: 118 | fixes = fix_notebook(str(notebook)) 119 | total_fixes += fixes 120 | if fixes > 0: 121 | fixed_notebooks += 1 122 | 123 | print(f"\nSummary: Fixed {total_fixes} issues in {fixed_notebooks} notebooks") 124 | print("Notebooks that were fixed have backups with the .bak extension") 125 | 126 | if __name__ == "__main__": 127 | main() 128 | -------------------------------------------------------------------------------- /notebooks/data/baseball14.csv: -------------------------------------------------------------------------------- 1 | playerID,yearID,stint,teamID,lgID,G,AB,R,H,2B,3B,HR,RBI,SB,CS,BB,SO,IBB,HBP,SH,SF,GIDP 2 | altuvjo01,2014,1,HOU,AL,158,660,85,225,47,3,7,59.0,56.0,9.0,36,53.0,7.0,5.0,1.0,5.0,20.0 3 | cartech02,2014,1,HOU,AL,145,507,68,115,21,1,37,88.0,5.0,2.0,56,182.0,6.0,5.0,0.0,4.0,12.0 4 | castrja01,2014,1,HOU,AL,126,465,43,103,21,2,14,56.0,1.0,0.0,34,151.0,1.0,9.0,1.0,3.0,11.0 5 | corpoca01,2014,1,HOU,AL,55,170,22,40,6,0,6,19.0,0.0,0.0,14,37.0,0.0,3.0,1.0,2.0,3.0 6 | dominma01,2014,1,HOU,AL,157,564,51,121,17,0,16,57.0,0.0,1.0,29,125.0,2.0,5.0,2.0,7.0,23.0 7 | fowlede01,2014,1,HOU,AL,116,434,61,120,21,4,8,35.0,11.0,4.0,66,108.0,2.0,3.0,1.0,1.0,6.0 8 | gonzama01,2014,1,HOU,AL,103,285,33,79,15,1,6,23.0,2.0,4.0,17,58.0,0.0,4.0,4.0,0.0,6.0 9 | grossro01,2014,1,HOU,AL,103,360,42,84,14,2,6,37.0,9.0,3.0,55,105.0,1.0,2.0,3.0,2.0,7.0 10 | guzmaje01,2014,1,HOU,AL,69,165,10,31,4,0,2,9.0,3.0,0.0,19,52.0,0.0,0.0,0.0,0.0,4.0 11 | hoeslj01,2014,1,HOU,AL,55,122,12,21,5,0,3,11.0,0.0,0.0,10,31.0,0.0,0.0,1.0,3.0,5.0 12 | krausma01,2014,1,HOU,AL,67,186,16,36,6,0,6,21.0,0.0,0.0,21,54.0,0.0,1.0,0.0,0.0,7.0 13 | marisja01,2014,2,HOU,AL,51,173,18,47,8,0,3,19.0,6.0,3.0,5,48.0,2.0,3.0,2.0,3.0,2.0 14 | preslal01,2014,1,HOU,AL,89,254,22,62,6,1,6,19.0,5.0,1.0,13,44.0,0.0,1.0,1.0,2.0,3.0 15 | singljo02,2014,1,HOU,AL,95,310,42,52,13,0,13,44.0,2.0,3.0,50,134.0,1.0,1.0,0.0,1.0,4.0 16 | springe01,2014,1,HOU,AL,78,295,45,68,8,1,20,51.0,5.0,2.0,39,114.0,4.0,9.0,0.0,2.0,4.0 17 | villajo01,2014,1,HOU,AL,87,263,31,55,13,2,7,27.0,17.0,4.0,19,80.0,1.0,2.0,4.0,1.0,4.0 18 | -------------------------------------------------------------------------------- /notebooks/data/baseball15.csv: -------------------------------------------------------------------------------- 1 | playerID,yearID,stint,teamID,lgID,G,AB,R,H,2B,3B,HR,RBI,SB,CS,BB,SO,IBB,HBP,SH,SF,GIDP 2 | altuvjo01,2015,1,HOU,AL,154,638,86,200,40,4,15,66.0,38.0,13.0,33,67.0,8.0,9.0,3.0,6.0,17.0 3 | cartech02,2015,1,HOU,AL,129,391,50,78,17,0,24,64.0,1.0,2.0,57,151.0,1.0,6.0,0.0,5.0,5.0 4 | castrja01,2015,1,HOU,AL,104,337,38,71,19,0,11,31.0,0.0,0.0,33,115.0,1.0,2.0,0.0,3.0,5.0 5 | congeha01,2015,1,HOU,AL,73,201,25,46,11,0,11,33.0,0.0,1.0,23,63.0,0.0,2.0,1.0,2.0,6.0 6 | correca01,2015,1,HOU,AL,99,387,52,108,22,1,22,68.0,14.0,4.0,40,78.0,2.0,1.0,0.0,4.0,10.0 7 | gattiev01,2015,1,HOU,AL,153,566,66,139,20,11,27,88.0,0.0,1.0,30,119.0,3.0,3.0,0.0,5.0,13.0 8 | gomezca01,2015,2,HOU,AL,41,149,19,36,9,0,4,13.0,10.0,3.0,8,31.0,1.0,2.0,3.0,1.0,1.0 9 | gonzama01,2015,1,HOU,AL,120,344,44,96,18,1,12,34.0,4.0,5.0,16,74.0,0.0,3.0,7.0,0.0,9.0 10 | lowrije01,2015,1,HOU,AL,69,230,35,51,14,0,9,30.0,1.0,0.0,28,43.0,5.0,3.0,0.0,2.0,3.0 11 | marisja01,2015,1,HOU,AL,133,339,46,80,15,4,9,36.0,24.0,9.0,18,105.0,0.0,5.0,6.0,4.0,2.0 12 | rasmuco01,2015,1,HOU,AL,137,432,67,103,23,2,25,61.0,2.0,1.0,47,154.0,0.0,2.0,1.0,3.0,6.0 13 | springe01,2015,1,HOU,AL,102,388,59,107,19,2,16,41.0,16.0,4.0,50,109.0,0.0,8.0,2.0,3.0,4.0 14 | tuckepr01,2015,1,HOU,AL,98,300,35,73,19,0,13,33.0,0.0,2.0,20,68.0,0.0,3.0,0.0,0.0,3.0 15 | valbulu01,2015,1,HOU,AL,132,434,62,97,18,0,25,56.0,1.0,0.0,50,106.0,1.0,6.0,0.0,3.0,13.0 16 | villajo01,2015,1,HOU,AL,53,116,18,33,7,1,2,11.0,7.0,2.0,10,29.0,0.0,0.0,1.0,1.0,3.0 17 | -------------------------------------------------------------------------------- /notebooks/data/baseball16.csv: -------------------------------------------------------------------------------- 1 | playerID,yearID,stint,teamID,lgID,G,AB,R,H,2B,3B,HR,RBI,SB,CS,BB,SO,IBB,HBP,SH,SF,GIDP 2 | altuvjo01,2016,1,HOU,AL,161,640,108,216,42,5,24,96.0,30.0,10.0,60,70.0,11.0,7.0,3.0,7.0,15.0 3 | bregmal01,2016,1,HOU,AL,49,201,31,53,13,3,8,34.0,2.0,0.0,15,52.0,0.0,0.0,0.0,1.0,1.0 4 | castrja01,2016,1,HOU,AL,113,329,41,69,16,3,11,32.0,2.0,1.0,45,123.0,0.0,1.0,1.0,0.0,9.0 5 | correca01,2016,1,HOU,AL,153,577,76,158,36,3,20,96.0,13.0,3.0,75,139.0,5.0,5.0,0.0,3.0,12.0 6 | gattiev01,2016,1,HOU,AL,128,447,58,112,19,0,32,72.0,2.0,1.0,43,127.0,6.0,4.0,0.0,5.0,12.0 7 | gomezca01,2016,1,HOU,AL,85,295,27,62,16,1,5,29.0,13.0,2.0,21,100.0,2.0,4.0,3.0,0.0,11.0 8 | gonzama01,2016,1,HOU,AL,141,484,55,123,26,3,13,51.0,12.0,6.0,22,118.0,1.0,5.0,6.0,1.0,16.0 9 | gourryu01,2016,1,HOU,AL,36,130,13,34,7,0,3,15.0,1.0,1.0,5,12.0,0.0,1.0,0.0,1.0,7.0 10 | kempto01,2016,1,HOU,AL,59,120,15,26,4,3,1,7.0,2.0,1.0,14,27.0,0.0,0.0,1.0,1.0,5.0 11 | marisja01,2016,1,HOU,AL,118,287,40,60,18,1,5,21.0,10.0,5.0,16,83.0,0.0,3.0,4.0,1.0,4.0 12 | rasmuco01,2016,1,HOU,AL,107,369,38,76,10,0,15,54.0,4.0,1.0,43,121.0,0.0,0.0,1.0,4.0,5.0 13 | reedaj01,2016,1,HOU,AL,45,122,11,20,3,0,3,8.0,0.0,0.0,18,48.0,0.0,0.0,0.0,1.0,1.0 14 | springe01,2016,1,HOU,AL,162,644,116,168,29,5,29,82.0,9.0,10.0,88,178.0,2.0,11.0,0.0,1.0,12.0 15 | tuckepr01,2016,1,HOU,AL,48,134,11,22,8,1,4,8.0,0.0,0.0,8,40.0,0.0,2.0,0.0,0.0,2.0 16 | valbulu01,2016,1,HOU,AL,90,292,38,76,17,1,13,40.0,1.0,1.0,44,81.0,2.0,1.0,3.0,2.0,5.0 17 | whitety01,2016,1,HOU,AL,86,249,24,54,16,0,8,28.0,1.0,0.0,23,65.0,1.0,2.0,0.0,2.0,6.0 18 | -------------------------------------------------------------------------------- /notebooks/data/chinook.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/notebooks/data/chinook.db -------------------------------------------------------------------------------- /notebooks/data/college_data_dictionary.csv: -------------------------------------------------------------------------------- 1 | column_name,description 2 | INSTNM,Institution Name 3 | CITY,City Location 4 | STABBR,State Abbreviation 5 | HBCU,Historically Black College or University 6 | MENONLY,0/1 Men Only 7 | WOMENONLY,0/1 Women only 8 | RELAFFIL,0/1 Religious Affiliation 9 | SATVRMID,SAT Verbal Median 10 | SATMTMID,SAT Math Median 11 | DISTANCEONLY,Distance Education Only 12 | UGDS,Undergraduate Enrollment 13 | UGDS_WHITE,Percent Undergrad White 14 | UGDS_BLACK,Percent Undergrad Black 15 | UGDS_HISP,Percent Undergrad Hispanic 16 | UGDS_ASIAN,Percent Undergrad Asian 17 | UGDS_AIAN,Percent Undergrad American Indian/Alaskan Native 18 | UGDS_NHPI,Percent Undergrad Native Hawaiian/Pacific Islander 19 | UGDS_2MOR,Percent Undergrad 2 or more races 20 | UGDS_NRA,Percent Undergrad non-resident aliens 21 | UGDS_UNKN,Percent Undergrad race unknown 22 | PPTUG_EF,Percent Students part-time 23 | CURROPER,0/1 Currently Operating 24 | PCTPELL,Percent Students with Pell grant 25 | PCTFLOAN,Percent Students with federal loan 26 | UG25ABV,Percent Students Older than 25 27 | MD_EARN_WNE_P10,Median Earnings 10 years after enrollment 28 | GRAD_DEBT_MDN_SUPP,Median debt of completers -------------------------------------------------------------------------------- /notebooks/data/college_diversity.csv: -------------------------------------------------------------------------------- 1 | School,Diversity Index 2 | "Rutgers University--Newark Newark, NJ",0.76 3 | "Andrews University Berrien Springs, MI",0.74 4 | "Stanford University Stanford, CA",0.74 5 | "University of Houston Houston, TX",0.74 6 | "University of Nevada--Las Vegas Las Vegas, NV",0.74 7 | "University of San Francisco San Francisco, CA",0.74 8 | "San Francisco State University San Francisco, CA",0.73 9 | "University of Illinois--Chicago Chicago, IL",0.73 10 | "New Jersey Institute of Technology Newark, NJ",0.72 11 | "Texas Woman's University Denton, TX",0.72 12 | -------------------------------------------------------------------------------- /notebooks/data/crime.h5: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/notebooks/data/crime.h5 -------------------------------------------------------------------------------- /notebooks/data/denver_pop.csv: -------------------------------------------------------------------------------- 1 | Year,Population 2 | 2017,705000 3 | 2016,693000 4 | 2015,680000 5 | 2014,662000 6 | 2013,647000 7 | 2012,634000 8 | -------------------------------------------------------------------------------- /notebooks/data/food_prices.csv: -------------------------------------------------------------------------------- 1 | item,store,price,Date 2 | pear,A,0.99,2017 3 | pear,B,1.99,2017 4 | peach,A,2.99,2017 5 | peach,B,3.49,2017 6 | banana,A,0.39,2017 7 | banana,B,0.49,2017 8 | steak,A,5.99,2017 9 | steak,B,6.99,2017 10 | steak,B,4.99,2015 11 | -------------------------------------------------------------------------------- /notebooks/data/food_transactions.csv: -------------------------------------------------------------------------------- 1 | custid,item,store,quantity 2 | 1,pear,A,5 3 | 1,banana,A,10 4 | 2,steak,B,3 5 | 2,pear,B,1 6 | 2,peach,B,2 7 | 2,steak,B,1 8 | 2,coconut,B,4 9 | -------------------------------------------------------------------------------- /notebooks/data/gas prices/all grades.csv: -------------------------------------------------------------------------------- 1 | Week,All Grades 2 | 09/25/2017,2.701 3 | 09/18/2017,2.75 4 | 09/11/2017,2.8 5 | 09/4/2017,2.794 6 | 08/28/2017,2.513 7 | 08/21/2017,2.474 8 | 08/14/2017,2.497 9 | 08/7/2017,2.492 10 | 07/31/2017,2.467 11 | 07/24/2017,2.426 12 | 07/17/2017,2.392 13 | 07/10/2017,2.411 14 | 07/3/2017,2.376 15 | 06/26/2017,2.404 16 | 06/19/2017,2.433 17 | 06/12/2017,2.479 18 | 06/5/2017,2.525 19 | 05/29/2017,2.516 20 | 05/22/2017,2.51 21 | 05/15/2017,2.481 22 | 05/8/2017,2.484 23 | 05/1/2017,2.522 24 | 04/24/2017,2.559 25 | 04/17/2017,2.546 26 | 04/10/2017,2.534 27 | 04/3/2017,2.471 28 | 03/27/2017,2.428 29 | 03/20/2017,2.433 30 | 03/13/2017,2.434 31 | 03/6/2017,2.452 32 | 02/27/2017,2.427 33 | 02/20/2017,2.414 34 | 02/13/2017,2.418 35 | 02/6/2017,2.405 36 | 01/30/2017,2.408 37 | 01/23/2017,2.436 38 | 01/16/2017,2.467 39 | 01/9/2017,2.496 40 | 01/2/2017,2.485 41 | 12/26/2016,2.419 42 | 12/19/2016,2.375 43 | 12/12/2016,2.347 44 | 12/5/2016,2.321 45 | 11/28/2016,2.268 46 | 11/21/2016,2.269 47 | 11/14/2016,2.298 48 | 11/7/2016,2.345 49 | 10/31/2016,2.341 50 | 10/24/2016,2.353 51 | 10/17/2016,2.367 52 | 10/10/2016,2.381 53 | 10/3/2016,2.354 54 | 09/26/2016,2.334 55 | 09/19/2016,2.333 56 | 09/12/2016,2.31 57 | 09/5/2016,2.329 58 | 08/29/2016,2.341 59 | 08/22/2016,2.299 60 | 08/15/2016,2.256 61 | 08/8/2016,2.256 62 | 08/1/2016,2.267 63 | 07/25/2016,2.289 64 | 07/18/2016,2.336 65 | 07/11/2016,2.359 66 | 07/4/2016,2.396 67 | 06/27/2016,2.432 68 | 06/20/2016,2.455 69 | 06/13/2016,2.499 70 | 06/6/2016,2.482 71 | 05/30/2016,2.44 72 | 05/23/2016,2.403 73 | 05/16/2016,2.345 74 | 05/9/2016,2.325 75 | 05/2/2016,2.342 76 | 04/25/2016,2.265 77 | 04/18/2016,2.24 78 | 04/11/2016,2.173 79 | 04/4/2016,2.185 80 | 03/28/2016,2.169 81 | 03/21/2016,2.109 82 | 03/14/2016,2.062 83 | 03/7/2016,1.943 84 | 02/29/2016,1.887 85 | 02/22/2016,1.837 86 | 02/15/2016,1.834 87 | 02/8/2016,1.87 88 | 02/1/2016,1.932 89 | 01/25/2016,1.965 90 | 01/18/2016,2.022 91 | 01/11/2016,2.104 92 | 01/4/2016,2.135 93 | 12/28/2015,2.141 94 | 12/21/2015,2.133 95 | 12/14/2015,2.144 96 | 12/7/2015,2.159 97 | 11/30/2015,2.165 98 | 11/23/2015,2.198 99 | 11/16/2015,2.281 100 | 11/9/2015,2.335 101 | 11/2/2015,2.322 102 | 10/26/2015,2.326 103 | 10/19/2015,2.374 104 | 10/12/2015,2.432 105 | 10/5/2015,2.415 106 | 09/28/2015,2.418 107 | 09/21/2015,2.425 108 | 09/14/2015,2.471 109 | 09/7/2015,2.532 110 | 08/31/2015,2.602 111 | 08/24/2015,2.726 112 | 08/17/2015,2.803 113 | 08/10/2015,2.72 114 | 08/3/2015,2.779 115 | 07/27/2015,2.833 116 | 07/20/2015,2.888 117 | 07/13/2015,2.92 118 | 07/6/2015,2.877 119 | 06/29/2015,2.885 120 | 06/22/2015,2.895 121 | 06/15/2015,2.918 122 | 06/8/2015,2.863 123 | 06/1/2015,2.863 124 | 05/25/2015,2.857 125 | 05/18/2015,2.827 126 | 05/11/2015,2.776 127 | 05/4/2015,2.749 128 | 04/27/2015,2.656 129 | 04/20/2015,2.57 130 | 04/13/2015,2.494 131 | 04/6/2015,2.499 132 | 03/30/2015,2.531 133 | 03/23/2015,2.538 134 | 03/16/2015,2.537 135 | 03/9/2015,2.57 136 | 03/2/2015,2.556 137 | 02/23/2015,2.415 138 | 02/16/2015,2.358 139 | 02/9/2015,2.276 140 | 02/2/2015,2.154 141 | 01/26/2015,2.133 142 | 01/19/2015,2.157 143 | 01/12/2015,2.232 144 | 01/5/2015,2.308 145 | 12/29/2014,2.392 146 | 12/22/2014,2.496 147 | 12/15/2014,2.643 148 | 12/8/2014,2.767 149 | 12/1/2014,2.864 150 | 11/24/2014,2.907 151 | 11/17/2014,2.978 152 | 11/10/2014,3.025 153 | 11/3/2014,3.077 154 | 10/27/2014,3.139 155 | 10/20/2014,3.205 156 | 10/13/2014,3.292 157 | 10/6/2014,3.382 158 | 09/29/2014,3.434 159 | 09/22/2014,3.432 160 | 09/15/2014,3.485 161 | 09/8/2014,3.534 162 | 09/1/2014,3.536 163 | 08/25/2014,3.532 164 | 08/18/2014,3.549 165 | 08/11/2014,3.582 166 | 08/4/2014,3.595 167 | 07/28/2014,3.617 168 | 07/21/2014,3.671 169 | 07/14/2014,3.712 170 | 07/7/2014,3.753 171 | 06/30/2014,3.778 172 | 06/23/2014,3.778 173 | 06/16/2014,3.76 174 | 06/9/2014,3.749 175 | 06/2/2014,3.765 176 | 05/26/2014,3.75 177 | 05/19/2014,3.743 178 | 05/12/2014,3.746 179 | 05/5/2014,3.761 180 | 04/28/2014,3.788 181 | 04/21/2014,3.758 182 | 04/14/2014,3.725 183 | 04/7/2014,3.67 184 | 03/31/2014,3.651 185 | 03/24/2014,3.622 186 | 03/17/2014,3.619 187 | 03/10/2014,3.584 188 | 03/3/2014,3.553 189 | 02/24/2014,3.52 190 | 02/17/2014,3.457 191 | 02/10/2014,3.388 192 | 02/3/2014,3.372 193 | 01/27/2014,3.375 194 | 01/20/2014,3.376 195 | 01/13/2014,3.406 196 | 01/6/2014,3.411 197 | 12/30/2013,3.409 198 | 12/23/2013,3.351 199 | 12/16/2013,3.321 200 | 12/9/2013,3.35 201 | 12/2/2013,3.353 202 | 11/25/2013,3.372 203 | 11/18/2013,3.298 204 | 11/11/2013,3.274 205 | 11/4/2013,3.343 206 | 10/28/2013,3.372 207 | 10/21/2013,3.435 208 | 10/14/2013,3.43 209 | 10/7/2013,3.441 210 | 09/30/2013,3.499 211 | 09/23/2013,3.567 212 | 09/16/2013,3.619 213 | 09/9/2013,3.658 214 | 09/2/2013,3.678 215 | 08/26/2013,3.623 216 | 08/19/2013,3.622 217 | 08/12/2013,3.633 218 | 08/5/2013,3.701 219 | 07/29/2013,3.716 220 | 07/22/2013,3.751 221 | 07/15/2013,3.706 222 | 07/8/2013,3.563 223 | 07/1/2013,3.567 224 | 06/24/2013,3.645 225 | 06/17/2013,3.689 226 | 06/10/2013,3.715 227 | 06/3/2013,3.705 228 | 05/27/2013,3.704 229 | 05/20/2013,3.729 230 | 05/13/2013,3.665 231 | 05/6/2013,3.602 232 | 04/29/2013,3.587 233 | 04/22/2013,3.603 234 | 04/15/2013,3.611 235 | 04/8/2013,3.676 236 | 04/1/2013,3.714 237 | 03/25/2013,3.746 238 | 03/18/2013,3.764 239 | 03/11/2013,3.779 240 | 03/4/2013,3.826 241 | 02/25/2013,3.851 242 | 02/18/2013,3.812 243 | 02/11/2013,3.677 244 | 02/4/2013,3.604 245 | 01/28/2013,3.427 246 | 01/21/2013,3.386 247 | 01/14/2013,3.377 248 | 01/7/2013,3.373 249 | 12/31/2012,3.369 250 | 12/24/2012,3.328 251 | 12/17/2012,3.324 252 | 12/10/2012,3.419 253 | 12/3/2012,3.463 254 | 11/26/2012,3.505 255 | 11/19/2012,3.497 256 | 11/12/2012,3.518 257 | 11/5/2012,3.563 258 | 10/29/2012,3.638 259 | 10/22/2012,3.756 260 | 10/15/2012,3.886 261 | 10/8/2012,3.914 262 | 10/1/2012,3.866 263 | 09/24/2012,3.889 264 | 09/17/2012,3.939 265 | 09/10/2012,3.907 266 | 09/3/2012,3.903 267 | 08/27/2012,3.837 268 | 08/20/2012,3.803 269 | 08/13/2012,3.779 270 | 08/6/2012,3.702 271 | 07/30/2012,3.568 272 | 07/23/2012,3.554 273 | 07/16/2012,3.485 274 | 07/9/2012,3.469 275 | 07/2/2012,3.415 276 | 06/25/2012,3.494 277 | 06/18/2012,3.589 278 | 06/11/2012,3.629 279 | 06/4/2012,3.671 280 | 05/28/2012,3.728 281 | 05/21/2012,3.773 282 | 05/14/2012,3.814 283 | 05/7/2012,3.849 284 | 04/30/2012,3.889 285 | 04/23/2012,3.929 286 | 04/16/2012,3.98 287 | 04/9/2012,3.997 288 | 04/2/2012,3.996 289 | 03/26/2012,3.973 290 | 03/19/2012,3.923 291 | 03/12/2012,3.884 292 | 03/5/2012,3.849 293 | 02/27/2012,3.78 294 | 02/20/2012,3.652 295 | 02/13/2012,3.584 296 | 02/6/2012,3.542 297 | 01/30/2012,3.5 298 | 01/23/2012,3.45 299 | 01/16/2012,3.451 300 | 01/9/2012,3.441 301 | 01/2/2012,3.358 302 | 12/26/2011,3.317 303 | 12/19/2011,3.29 304 | 12/12/2011,3.346 305 | 12/5/2011,3.35 306 | 11/28/2011,3.368 307 | 11/21/2011,3.427 308 | 11/14/2011,3.495 309 | 11/7/2011,3.482 310 | 10/31/2011,3.511 311 | 10/24/2011,3.52 312 | 10/17/2011,3.533 313 | 10/10/2011,3.476 314 | 10/3/2011,3.492 315 | 09/26/2011,3.568 316 | 09/19/2011,3.657 317 | 09/12/2011,3.715 318 | 09/5/2011,3.727 319 | 08/29/2011,3.682 320 | 08/22/2011,3.638 321 | 08/15/2011,3.662 322 | 08/8/2011,3.73 323 | 08/1/2011,3.766 324 | 07/25/2011,3.754 325 | 07/18/2011,3.736 326 | 07/11/2011,3.695 327 | 07/4/2011,3.634 328 | 06/27/2011,3.631 329 | 06/20/2011,3.708 330 | 06/13/2011,3.767 331 | 06/6/2011,3.833 332 | 05/30/2011,3.848 333 | 05/23/2011,3.904 334 | 05/16/2011,4.014 335 | 05/9/2011,4.018 336 | 05/2/2011,4.014 337 | 04/25/2011,3.932 338 | 04/18/2011,3.896 339 | 04/11/2011,3.843 340 | 04/4/2011,3.737 341 | 03/28/2011,3.65 342 | 03/21/2011,3.617 343 | 03/14/2011,3.621 344 | 03/7/2011,3.572 345 | 02/28/2011,3.435 346 | 02/21/2011,3.243 347 | 02/14/2011,3.193 348 | 02/7/2011,3.185 349 | 01/31/2011,3.155 350 | 01/24/2011,3.163 351 | 01/17/2011,3.158 352 | 01/10/2011,3.142 353 | 01/3/2011,3.124 354 | 12/27/2010,3.106 355 | 12/20/2010,3.037 356 | 12/13/2010,3.035 357 | 12/6/2010,3.013 358 | 11/29/2010,2.912 359 | 11/22/2010,2.931 360 | 11/15/2010,2.944 361 | 11/8/2010,2.917 362 | 11/1/2010,2.861 363 | 10/25/2010,2.87 364 | 10/18/2010,2.887 365 | 10/11/2010,2.871 366 | 10/4/2010,2.784 367 | 09/27/2010,2.747 368 | 09/20/2010,2.775 369 | 09/13/2010,2.772 370 | 09/6/2010,2.735 371 | 08/30/2010,2.736 372 | 08/23/2010,2.759 373 | 08/16/2010,2.798 374 | 08/9/2010,2.835 375 | 08/2/2010,2.788 376 | 07/26/2010,2.801 377 | 07/19/2010,2.775 378 | 07/12/2010,2.771 379 | 07/5/2010,2.779 380 | 06/28/2010,2.809 381 | 06/21/2010,2.795 382 | 06/14/2010,2.756 383 | 06/7/2010,2.78 384 | 05/31/2010,2.784 385 | 05/24/2010,2.842 386 | 05/17/2010,2.918 387 | 05/10/2010,2.958 388 | 05/3/2010,2.95 389 | 04/26/2010,2.901 390 | 04/19/2010,2.911 391 | 04/12/2010,2.909 392 | 04/5/2010,2.877 393 | 03/29/2010,2.851 394 | 03/22/2010,2.87 395 | 03/15/2010,2.841 396 | 03/8/2010,2.804 397 | 03/1/2010,2.756 398 | 02/22/2010,2.709 399 | 02/15/2010,2.664 400 | 02/8/2010,2.707 401 | 02/1/2010,2.717 402 | 01/25/2010,2.76 403 | 01/18/2010,2.793 404 | 01/11/2010,2.804 405 | 01/4/2010,2.718 406 | 12/28/2009,2.662 407 | 12/21/2009,2.645 408 | 12/14/2009,2.655 409 | 12/7/2009,2.689 410 | 11/30/2009,2.684 411 | 11/23/2009,2.694 412 | 11/16/2009,2.684 413 | 11/9/2009,2.72 414 | 11/2/2009,2.746 415 | 10/26/2009,2.727 416 | 10/19/2009,2.626 417 | 10/12/2009,2.543 418 | 10/5/2009,2.523 419 | 09/28/2009,2.554 420 | 09/21/2009,2.607 421 | 09/14/2009,2.632 422 | 09/7/2009,2.642 423 | 08/31/2009,2.667 424 | 08/24/2009,2.682 425 | 08/17/2009,2.691 426 | 08/10/2009,2.7 427 | 08/3/2009,2.61 428 | 07/27/2009,2.557 429 | 07/20/2009,2.519 430 | 07/13/2009,2.584 431 | 07/6/2009,2.666 432 | 06/29/2009,2.695 433 | 06/22/2009,2.743 434 | 06/15/2009,2.722 435 | 06/8/2009,2.673 436 | 06/1/2009,2.572 437 | 05/25/2009,2.485 438 | 05/18/2009,2.36 439 | 05/11/2009,2.29 440 | 05/4/2009,2.129 441 | 04/27/2009,2.102 442 | 04/20/2009,2.112 443 | 04/13/2009,2.104 444 | 04/6/2009,2.09 445 | 03/30/2009,2.097 446 | 03/23/2009,2.014 447 | 03/16/2009,1.964 448 | 03/9/2009,1.993 449 | 03/2/2009,1.988 450 | 02/23/2009,1.963 451 | 02/16/2009,2.016 452 | 02/9/2009,1.978 453 | 02/2/2009,1.944 454 | 01/26/2009,1.89 455 | 01/19/2009,1.898 456 | 01/12/2009,1.835 457 | 01/5/2009,1.737 458 | 12/29/2008,1.67 459 | 12/22/2008,1.71 460 | 12/15/2008,1.716 461 | 12/8/2008,1.758 462 | 12/1/2008,1.87 463 | 11/24/2008,1.952 464 | 11/17/2008,2.132 465 | 11/10/2008,2.284 466 | 11/3/2008,2.462 467 | 10/27/2008,2.718 468 | 10/20/2008,2.974 469 | 10/13/2008,3.213 470 | 10/6/2008,3.543 471 | 09/29/2008,3.687 472 | 09/22/2008,3.772 473 | 09/15/2008,3.887 474 | 09/8/2008,3.701 475 | 09/1/2008,3.733 476 | 08/25/2008,3.738 477 | 08/18/2008,3.794 478 | 08/11/2008,3.864 479 | 08/4/2008,3.935 480 | 07/28/2008,4.01 481 | 07/21/2008,4.118 482 | 07/14/2008,4.164 483 | 07/7/2008,4.165 484 | 06/30/2008,4.146 485 | 06/23/2008,4.131 486 | 06/16/2008,4.134 487 | 06/9/2008,4.09 488 | 06/2/2008,4.026 489 | 05/26/2008,3.986 490 | 05/19/2008,3.84 491 | 05/12/2008,3.771 492 | 05/5/2008,3.663 493 | 04/28/2008,3.653 494 | 04/21/2008,3.557 495 | 04/14/2008,3.438 496 | 04/7/2008,3.381 497 | 03/31/2008,3.339 498 | 03/24/2008,3.31 499 | 03/17/2008,3.332 500 | 03/10/2008,3.273 501 | 03/3/2008,3.212 502 | 02/25/2008,3.18 503 | 02/18/2008,3.092 504 | 02/11/2008,3.011 505 | 02/4/2008,3.03 506 | 01/28/2008,3.03 507 | 01/21/2008,3.07 508 | 01/14/2008,3.119 509 | 01/7/2008,3.159 510 | 12/31/2007,3.104 511 | 12/24/2007,3.032 512 | 12/17/2007,3.05 513 | 12/10/2007,3.053 514 | 12/3/2007,3.113 515 | 11/26/2007,3.147 516 | 11/19/2007,3.148 517 | 11/12/2007,3.158 518 | 11/5/2007,3.06 519 | 10/29/2007,2.921 520 | 10/22/2007,2.873 521 | 10/15/2007,2.813 522 | 10/8/2007,2.821 523 | 10/1/2007,2.838 524 | 09/24/2007,2.86 525 | 09/17/2007,2.835 526 | 09/10/2007,2.862 527 | 09/3/2007,2.84 528 | 08/27/2007,2.796 529 | 08/20/2007,2.832 530 | 08/13/2007,2.821 531 | 08/6/2007,2.888 532 | 07/30/2007,2.926 533 | 07/23/2007,3.005 534 | 07/16/2007,3.092 535 | 07/9/2007,3.026 536 | 07/2/2007,3.005 537 | 06/25/2007,3.029 538 | 06/18/2007,3.057 539 | 06/11/2007,3.122 540 | 06/4/2007,3.2 541 | 05/28/2007,3.25 542 | 05/21/2007,3.258 543 | 05/14/2007,3.143 544 | 05/7/2007,3.097 545 | 04/30/2007,3.017 546 | 04/23/2007,2.917 547 | 04/16/2007,2.922 548 | 04/9/2007,2.848 549 | 04/2/2007,2.753 550 | 03/26/2007,2.655 551 | 03/19/2007,2.623 552 | 03/12/2007,2.605 553 | 03/5/2007,2.551 554 | 02/26/2007,2.428 555 | 02/19/2007,2.341 556 | 02/12/2007,2.287 557 | 02/5/2007,2.237 558 | 01/29/2007,2.213 559 | 01/22/2007,2.216 560 | 01/15/2007,2.28 561 | 01/8/2007,2.354 562 | 01/1/2007,2.382 563 | -------------------------------------------------------------------------------- /notebooks/data/gas prices/diesel.csv: -------------------------------------------------------------------------------- 1 | Week,Diesel 2 | 09/25/2017,2.788 3 | 09/18/2017,2.791 4 | 09/11/2017,2.802 5 | 09/4/2017,2.758 6 | 08/28/2017,2.605 7 | 08/21/2017,2.596 8 | 08/14/2017,2.598 9 | 08/7/2017,2.581 10 | 07/31/2017,2.531 11 | 07/24/2017,2.507 12 | 07/17/2017,2.491 13 | 07/10/2017,2.481 14 | 07/3/2017,2.472 15 | 06/26/2017,2.465 16 | 06/19/2017,2.489 17 | 06/12/2017,2.524 18 | 06/5/2017,2.564 19 | 05/29/2017,2.571 20 | 05/22/2017,2.539 21 | 05/15/2017,2.544 22 | 05/8/2017,2.565 23 | 05/1/2017,2.583 24 | 04/24/2017,2.595 25 | 04/17/2017,2.597 26 | 04/10/2017,2.582 27 | 04/3/2017,2.556 28 | 03/27/2017,2.532 29 | 03/20/2017,2.539 30 | 03/13/2017,2.564 31 | 03/6/2017,2.579 32 | 02/27/2017,2.577 33 | 02/20/2017,2.572 34 | 02/13/2017,2.565 35 | 02/6/2017,2.558 36 | 01/30/2017,2.562 37 | 01/23/2017,2.569 38 | 01/16/2017,2.585 39 | 01/9/2017,2.597 40 | 01/2/2017,2.586 41 | 12/26/2016,2.54 42 | 12/19/2016,2.527 43 | 12/12/2016,2.493 44 | 12/5/2016,2.48 45 | 11/28/2016,2.42 46 | 11/21/2016,2.421 47 | 11/14/2016,2.443 48 | 11/7/2016,2.47 49 | 10/31/2016,2.479 50 | 10/24/2016,2.478 51 | 10/17/2016,2.481 52 | 10/10/2016,2.445 53 | 10/3/2016,2.389 54 | 09/26/2016,2.382 55 | 09/19/2016,2.389 56 | 09/12/2016,2.399 57 | 09/5/2016,2.407 58 | 08/29/2016,2.409 59 | 08/22/2016,2.37 60 | 08/15/2016,2.31 61 | 08/8/2016,2.316 62 | 08/1/2016,2.348 63 | 07/25/2016,2.379 64 | 07/18/2016,2.402 65 | 07/11/2016,2.414 66 | 07/4/2016,2.423 67 | 06/27/2016,2.426 68 | 06/20/2016,2.426 69 | 06/13/2016,2.431 70 | 06/6/2016,2.407 71 | 05/30/2016,2.382 72 | 05/23/2016,2.357 73 | 05/16/2016,2.297 74 | 05/9/2016,2.271 75 | 05/2/2016,2.266 76 | 04/25/2016,2.198 77 | 04/18/2016,2.165 78 | 04/11/2016,2.128 79 | 04/4/2016,2.115 80 | 03/28/2016,2.121 81 | 03/21/2016,2.119 82 | 03/14/2016,2.099 83 | 03/7/2016,2.021 84 | 02/29/2016,1.989 85 | 02/22/2016,1.983 86 | 02/15/2016,1.98 87 | 02/8/2016,2.008 88 | 02/1/2016,2.031 89 | 01/25/2016,2.071 90 | 01/18/2016,2.112 91 | 01/11/2016,2.177 92 | 01/4/2016,2.211 93 | 12/28/2015,2.237 94 | 12/21/2015,2.284 95 | 12/14/2015,2.338 96 | 12/7/2015,2.379 97 | 11/30/2015,2.421 98 | 11/23/2015,2.445 99 | 11/16/2015,2.482 100 | 11/9/2015,2.502 101 | 11/2/2015,2.485 102 | 10/26/2015,2.498 103 | 10/19/2015,2.531 104 | 10/12/2015,2.556 105 | 10/5/2015,2.492 106 | 09/28/2015,2.476 107 | 09/21/2015,2.493 108 | 09/14/2015,2.517 109 | 09/7/2015,2.534 110 | 08/31/2015,2.514 111 | 08/24/2015,2.561 112 | 08/17/2015,2.615 113 | 08/10/2015,2.617 114 | 08/3/2015,2.668 115 | 07/27/2015,2.723 116 | 07/20/2015,2.782 117 | 07/13/2015,2.814 118 | 07/6/2015,2.832 119 | 06/29/2015,2.843 120 | 06/22/2015,2.859 121 | 06/15/2015,2.87 122 | 06/8/2015,2.884 123 | 06/1/2015,2.909 124 | 05/25/2015,2.914 125 | 05/18/2015,2.904 126 | 05/11/2015,2.878 127 | 05/4/2015,2.854 128 | 04/27/2015,2.811 129 | 04/20/2015,2.78 130 | 04/13/2015,2.754 131 | 04/6/2015,2.784 132 | 03/30/2015,2.824 133 | 03/23/2015,2.864 134 | 03/16/2015,2.917 135 | 03/9/2015,2.944 136 | 03/2/2015,2.936 137 | 02/23/2015,2.9 138 | 02/16/2015,2.865 139 | 02/9/2015,2.835 140 | 02/2/2015,2.831 141 | 01/26/2015,2.866 142 | 01/19/2015,2.933 143 | 01/12/2015,3.053 144 | 01/5/2015,3.137 145 | 12/29/2014,3.213 146 | 12/22/2014,3.281 147 | 12/15/2014,3.419 148 | 12/8/2014,3.535 149 | 12/1/2014,3.605 150 | 11/24/2014,3.628 151 | 11/17/2014,3.661 152 | 11/10/2014,3.677 153 | 11/3/2014,3.623 154 | 10/27/2014,3.635 155 | 10/20/2014,3.656 156 | 10/13/2014,3.698 157 | 10/6/2014,3.733 158 | 09/29/2014,3.755 159 | 09/22/2014,3.778 160 | 09/15/2014,3.801 161 | 09/8/2014,3.814 162 | 09/1/2014,3.814 163 | 08/25/2014,3.821 164 | 08/18/2014,3.835 165 | 08/11/2014,3.843 166 | 08/4/2014,3.853 167 | 07/28/2014,3.858 168 | 07/21/2014,3.869 169 | 07/14/2014,3.894 170 | 07/7/2014,3.913 171 | 06/30/2014,3.92 172 | 06/23/2014,3.919 173 | 06/16/2014,3.882 174 | 06/9/2014,3.892 175 | 06/2/2014,3.918 176 | 05/26/2014,3.925 177 | 05/19/2014,3.934 178 | 05/12/2014,3.948 179 | 05/5/2014,3.964 180 | 04/28/2014,3.975 181 | 04/21/2014,3.971 182 | 04/14/2014,3.952 183 | 04/7/2014,3.959 184 | 03/31/2014,3.975 185 | 03/24/2014,3.988 186 | 03/17/2014,4.003 187 | 03/10/2014,4.021 188 | 03/3/2014,4.016 189 | 02/24/2014,4.017 190 | 02/17/2014,3.989 191 | 02/10/2014,3.977 192 | 02/3/2014,3.951 193 | 01/27/2014,3.904 194 | 01/20/2014,3.873 195 | 01/13/2014,3.886 196 | 01/6/2014,3.91 197 | 12/30/2013,3.903 198 | 12/23/2013,3.873 199 | 12/16/2013,3.871 200 | 12/9/2013,3.879 201 | 12/2/2013,3.883 202 | 11/25/2013,3.844 203 | 11/18/2013,3.822 204 | 11/11/2013,3.832 205 | 11/4/2013,3.857 206 | 10/28/2013,3.87 207 | 10/21/2013,3.886 208 | 10/14/2013,3.886 209 | 10/7/2013,3.897 210 | 09/30/2013,3.919 211 | 09/23/2013,3.949 212 | 09/16/2013,3.974 213 | 09/9/2013,3.981 214 | 09/2/2013,3.981 215 | 08/26/2013,3.913 216 | 08/19/2013,3.9 217 | 08/12/2013,3.896 218 | 08/5/2013,3.909 219 | 07/29/2013,3.915 220 | 07/22/2013,3.903 221 | 07/15/2013,3.867 222 | 07/8/2013,3.828 223 | 07/1/2013,3.817 224 | 06/24/2013,3.838 225 | 06/17/2013,3.841 226 | 06/10/2013,3.849 227 | 06/3/2013,3.869 228 | 05/27/2013,3.88 229 | 05/20/2013,3.89 230 | 05/13/2013,3.866 231 | 05/6/2013,3.845 232 | 04/29/2013,3.851 233 | 04/22/2013,3.887 234 | 04/15/2013,3.942 235 | 04/8/2013,3.977 236 | 04/1/2013,3.993 237 | 03/25/2013,4.006 238 | 03/18/2013,4.047 239 | 03/11/2013,4.088 240 | 03/4/2013,4.13 241 | 02/25/2013,4.159 242 | 02/18/2013,4.157 243 | 02/11/2013,4.104 244 | 02/4/2013,4.022 245 | 01/28/2013,3.927 246 | 01/21/2013,3.902 247 | 01/14/2013,3.894 248 | 01/7/2013,3.911 249 | 12/31/2012,3.918 250 | 12/24/2012,3.923 251 | 12/17/2012,3.945 252 | 12/10/2012,3.991 253 | 12/3/2012,4.027 254 | 11/26/2012,4.034 255 | 11/19/2012,3.976 256 | 11/12/2012,3.98 257 | 11/5/2012,4.01 258 | 10/29/2012,4.03 259 | 10/22/2012,4.116 260 | 10/15/2012,4.15 261 | 10/8/2012,4.094 262 | 10/1/2012,4.079 263 | 09/24/2012,4.086 264 | 09/17/2012,4.135 265 | 09/10/2012,4.132 266 | 09/3/2012,4.127 267 | 08/27/2012,4.089 268 | 08/20/2012,4.026 269 | 08/13/2012,3.965 270 | 08/6/2012,3.85 271 | 07/30/2012,3.796 272 | 07/23/2012,3.783 273 | 07/16/2012,3.695 274 | 07/9/2012,3.683 275 | 07/2/2012,3.648 276 | 06/25/2012,3.678 277 | 06/18/2012,3.729 278 | 06/11/2012,3.781 279 | 06/4/2012,3.846 280 | 05/28/2012,3.897 281 | 05/21/2012,3.956 282 | 05/14/2012,4.004 283 | 05/7/2012,4.057 284 | 04/30/2012,4.073 285 | 04/23/2012,4.085 286 | 04/16/2012,4.127 287 | 04/9/2012,4.148 288 | 04/2/2012,4.142 289 | 03/26/2012,4.147 290 | 03/19/2012,4.142 291 | 03/12/2012,4.123 292 | 03/5/2012,4.094 293 | 02/27/2012,4.051 294 | 02/20/2012,3.96 295 | 02/13/2012,3.943 296 | 02/6/2012,3.856 297 | 01/30/2012,3.85 298 | 01/23/2012,3.848 299 | 01/16/2012,3.854 300 | 01/9/2012,3.828 301 | 01/2/2012,3.783 302 | 12/26/2011,3.791 303 | 12/19/2011,3.828 304 | 12/12/2011,3.894 305 | 12/5/2011,3.931 306 | 11/28/2011,3.964 307 | 11/21/2011,4.01 308 | 11/14/2011,3.987 309 | 11/7/2011,3.887 310 | 10/31/2011,3.892 311 | 10/24/2011,3.825 312 | 10/17/2011,3.801 313 | 10/10/2011,3.721 314 | 10/3/2011,3.749 315 | 09/26/2011,3.786 316 | 09/19/2011,3.833 317 | 09/12/2011,3.862 318 | 09/5/2011,3.868 319 | 08/29/2011,3.82 320 | 08/22/2011,3.81 321 | 08/15/2011,3.835 322 | 08/8/2011,3.897 323 | 08/1/2011,3.937 324 | 07/25/2011,3.949 325 | 07/18/2011,3.923 326 | 07/11/2011,3.899 327 | 07/4/2011,3.85 328 | 06/27/2011,3.888 329 | 06/20/2011,3.95 330 | 06/13/2011,3.954 331 | 06/6/2011,3.94 332 | 05/30/2011,3.948 333 | 05/23/2011,3.997 334 | 05/16/2011,4.061 335 | 05/9/2011,4.104 336 | 05/2/2011,4.124 337 | 04/25/2011,4.098 338 | 04/18/2011,4.105 339 | 04/11/2011,4.078 340 | 04/4/2011,3.976 341 | 03/28/2011,3.932 342 | 03/21/2011,3.907 343 | 03/14/2011,3.908 344 | 03/7/2011,3.871 345 | 02/28/2011,3.716 346 | 02/21/2011,3.573 347 | 02/14/2011,3.534 348 | 02/7/2011,3.513 349 | 01/31/2011,3.438 350 | 01/24/2011,3.43 351 | 01/17/2011,3.407 352 | 01/10/2011,3.333 353 | 01/3/2011,3.331 354 | 12/27/2010,3.294 355 | 12/20/2010,3.248 356 | 12/13/2010,3.231 357 | 12/6/2010,3.197 358 | 11/29/2010,3.162 359 | 11/22/2010,3.171 360 | 11/15/2010,3.184 361 | 11/8/2010,3.116 362 | 11/1/2010,3.067 363 | 10/25/2010,3.067 364 | 10/18/2010,3.073 365 | 10/11/2010,3.066 366 | 10/4/2010,3 367 | 09/27/2010,2.951 368 | 09/20/2010,2.96 369 | 09/13/2010,2.943 370 | 09/6/2010,2.931 371 | 08/30/2010,2.938 372 | 08/23/2010,2.957 373 | 08/16/2010,2.979 374 | 08/9/2010,2.991 375 | 08/2/2010,2.928 376 | 07/26/2010,2.919 377 | 07/19/2010,2.899 378 | 07/12/2010,2.903 379 | 07/5/2010,2.924 380 | 06/28/2010,2.956 381 | 06/21/2010,2.961 382 | 06/14/2010,2.928 383 | 06/7/2010,2.946 384 | 05/31/2010,2.98 385 | 05/24/2010,3.021 386 | 05/17/2010,3.094 387 | 05/10/2010,3.127 388 | 05/3/2010,3.122 389 | 04/26/2010,3.078 390 | 04/19/2010,3.074 391 | 04/12/2010,3.069 392 | 04/5/2010,3.015 393 | 03/29/2010,2.939 394 | 03/22/2010,2.946 395 | 03/15/2010,2.924 396 | 03/8/2010,2.904 397 | 03/1/2010,2.861 398 | 02/22/2010,2.832 399 | 02/15/2010,2.756 400 | 02/8/2010,2.769 401 | 02/1/2010,2.781 402 | 01/25/2010,2.833 403 | 01/18/2010,2.87 404 | 01/11/2010,2.879 405 | 01/4/2010,2.797 406 | 12/28/2009,2.732 407 | 12/21/2009,2.726 408 | 12/14/2009,2.748 409 | 12/7/2009,2.772 410 | 11/30/2009,2.775 411 | 11/23/2009,2.787 412 | 11/16/2009,2.79 413 | 11/9/2009,2.801 414 | 11/2/2009,2.808 415 | 10/26/2009,2.801 416 | 10/19/2009,2.705 417 | 10/12/2009,2.6 418 | 10/5/2009,2.582 419 | 09/28/2009,2.601 420 | 09/21/2009,2.622 421 | 09/14/2009,2.634 422 | 09/7/2009,2.647 423 | 08/31/2009,2.674 424 | 08/24/2009,2.668 425 | 08/17/2009,2.652 426 | 08/10/2009,2.625 427 | 08/3/2009,2.55 428 | 07/27/2009,2.528 429 | 07/20/2009,2.496 430 | 07/13/2009,2.542 431 | 07/6/2009,2.594 432 | 06/29/2009,2.608 433 | 06/22/2009,2.616 434 | 06/15/2009,2.572 435 | 06/8/2009,2.498 436 | 06/1/2009,2.352 437 | 05/25/2009,2.274 438 | 05/18/2009,2.231 439 | 05/11/2009,2.216 440 | 05/4/2009,2.185 441 | 04/27/2009,2.201 442 | 04/20/2009,2.221 443 | 04/13/2009,2.229 444 | 04/6/2009,2.228 445 | 03/30/2009,2.221 446 | 03/23/2009,2.09 447 | 03/16/2009,2.017 448 | 03/9/2009,2.045 449 | 03/2/2009,2.087 450 | 02/23/2009,2.13 451 | 02/16/2009,2.186 452 | 02/9/2009,2.219 453 | 02/2/2009,2.246 454 | 01/26/2009,2.268 455 | 01/19/2009,2.296 456 | 01/12/2009,2.314 457 | 01/5/2009,2.291 458 | 12/29/2008,2.327 459 | 12/22/2008,2.366 460 | 12/15/2008,2.422 461 | 12/8/2008,2.515 462 | 12/1/2008,2.615 463 | 11/24/2008,2.664 464 | 11/17/2008,2.809 465 | 11/10/2008,2.944 466 | 11/3/2008,3.088 467 | 10/27/2008,3.288 468 | 10/20/2008,3.482 469 | 10/13/2008,3.659 470 | 10/6/2008,3.875 471 | 09/29/2008,3.959 472 | 09/22/2008,3.958 473 | 09/15/2008,4.023 474 | 09/8/2008,4.059 475 | 09/1/2008,4.121 476 | 08/25/2008,4.145 477 | 08/18/2008,4.207 478 | 08/11/2008,4.353 479 | 08/4/2008,4.502 480 | 07/28/2008,4.603 481 | 07/21/2008,4.718 482 | 07/14/2008,4.764 483 | 07/7/2008,4.727 484 | 06/30/2008,4.645 485 | 06/23/2008,4.648 486 | 06/16/2008,4.692 487 | 06/9/2008,4.692 488 | 06/2/2008,4.707 489 | 05/26/2008,4.723 490 | 05/19/2008,4.497 491 | 05/12/2008,4.331 492 | 05/5/2008,4.149 493 | 04/28/2008,4.177 494 | 04/21/2008,4.143 495 | 04/14/2008,4.059 496 | 04/7/2008,3.955 497 | 03/31/2008,3.964 498 | 03/24/2008,3.989 499 | 03/17/2008,3.974 500 | 03/10/2008,3.819 501 | 03/3/2008,3.658 502 | 02/25/2008,3.552 503 | 02/18/2008,3.396 504 | 02/11/2008,3.28 505 | 02/4/2008,3.28 506 | 01/28/2008,3.259 507 | 01/21/2008,3.27 508 | 01/14/2008,3.326 509 | 01/7/2008,3.376 510 | 12/31/2007,3.345 511 | 12/24/2007,3.308 512 | 12/17/2007,3.309 513 | 12/10/2007,3.325 514 | 12/3/2007,3.416 515 | 11/26/2007,3.444 516 | 11/19/2007,3.41 517 | 11/12/2007,3.425 518 | 11/5/2007,3.303 519 | 10/29/2007,3.157 520 | 10/22/2007,3.094 521 | 10/15/2007,3.039 522 | 10/8/2007,3.035 523 | 10/1/2007,3.048 524 | 09/24/2007,3.032 525 | 09/17/2007,2.964 526 | 09/10/2007,2.924 527 | 09/3/2007,2.893 528 | 08/27/2007,2.863 529 | 08/20/2007,2.868 530 | 08/13/2007,2.847 531 | 08/6/2007,2.898 532 | 07/30/2007,2.886 533 | 07/23/2007,2.889 534 | 07/16/2007,2.889 535 | 07/9/2007,2.849 536 | 07/2/2007,2.829 537 | 06/25/2007,2.835 538 | 06/18/2007,2.805 539 | 06/11/2007,2.792 540 | 06/4/2007,2.799 541 | 05/28/2007,2.817 542 | 05/21/2007,2.803 543 | 05/14/2007,2.773 544 | 05/7/2007,2.792 545 | 04/30/2007,2.811 546 | 04/23/2007,2.851 547 | 04/16/2007,2.877 548 | 04/9/2007,2.84 549 | 04/2/2007,2.79 550 | 03/26/2007,2.676 551 | 03/19/2007,2.681 552 | 03/12/2007,2.685 553 | 03/5/2007,2.626 554 | 02/26/2007,2.551 555 | 02/19/2007,2.491 556 | 02/12/2007,2.476 557 | 02/5/2007,2.435 558 | 01/29/2007,2.413 559 | 01/22/2007,2.43 560 | 01/15/2007,2.463 561 | 01/8/2007,2.537 562 | 01/1/2007,2.58 563 | -------------------------------------------------------------------------------- /notebooks/data/gas prices/midgrade.csv: -------------------------------------------------------------------------------- 1 | Week,Midgrade 2 | 09/25/2017,2.859 3 | 09/18/2017,2.906 4 | 09/11/2017,2.953 5 | 09/4/2017,2.946 6 | 08/28/2017,2.668 7 | 08/21/2017,2.631 8 | 08/14/2017,2.653 9 | 08/7/2017,2.644 10 | 07/31/2017,2.623 11 | 07/24/2017,2.582 12 | 07/17/2017,2.551 13 | 07/10/2017,2.569 14 | 07/3/2017,2.536 15 | 06/26/2017,2.565 16 | 06/19/2017,2.593 17 | 06/12/2017,2.633 18 | 06/5/2017,2.677 19 | 05/29/2017,2.665 20 | 05/22/2017,2.663 21 | 05/15/2017,2.634 22 | 05/8/2017,2.635 23 | 05/1/2017,2.673 24 | 04/24/2017,2.706 25 | 04/17/2017,2.694 26 | 04/10/2017,2.683 27 | 04/3/2017,2.622 28 | 03/27/2017,2.583 29 | 03/20/2017,2.587 30 | 03/13/2017,2.586 31 | 03/6/2017,2.604 32 | 02/27/2017,2.579 33 | 02/20/2017,2.564 34 | 02/13/2017,2.566 35 | 02/6/2017,2.552 36 | 01/30/2017,2.553 37 | 01/23/2017,2.578 38 | 01/16/2017,2.607 39 | 01/9/2017,2.636 40 | 01/2/2017,2.622 41 | 12/26/2016,2.561 42 | 12/19/2016,2.522 43 | 12/12/2016,2.494 44 | 12/5/2016,2.471 45 | 11/28/2016,2.423 46 | 11/21/2016,2.423 47 | 11/14/2016,2.455 48 | 11/7/2016,2.498 49 | 10/31/2016,2.493 50 | 10/24/2016,2.502 51 | 10/17/2016,2.516 52 | 10/10/2016,2.529 53 | 10/3/2016,2.506 54 | 09/26/2016,2.484 55 | 09/19/2016,2.481 56 | 09/12/2016,2.454 57 | 09/5/2016,2.468 58 | 08/29/2016,2.481 59 | 08/22/2016,2.441 60 | 08/15/2016,2.401 61 | 08/8/2016,2.398 62 | 08/1/2016,2.413 63 | 07/25/2016,2.434 64 | 07/18/2016,2.479 65 | 07/11/2016,2.501 66 | 07/4/2016,2.537 67 | 06/27/2016,2.57 68 | 06/20/2016,2.592 69 | 06/13/2016,2.632 70 | 06/6/2016,2.616 71 | 05/30/2016,2.574 72 | 05/23/2016,2.541 73 | 05/16/2016,2.485 74 | 05/9/2016,2.469 75 | 05/2/2016,2.482 76 | 04/25/2016,2.405 77 | 04/18/2016,2.378 78 | 04/11/2016,2.315 79 | 04/4/2016,2.323 80 | 03/28/2016,2.31 81 | 03/21/2016,2.248 82 | 03/14/2016,2.2 83 | 03/7/2016,2.081 84 | 02/29/2016,2.029 85 | 02/22/2016,1.983 86 | 02/15/2016,1.984 87 | 02/8/2016,2.025 88 | 02/1/2016,2.085 89 | 01/25/2016,2.118 90 | 01/18/2016,2.172 91 | 01/11/2016,2.253 92 | 01/4/2016,2.285 93 | 12/28/2015,2.29 94 | 12/21/2015,2.28 95 | 12/14/2015,2.287 96 | 12/7/2015,2.303 97 | 11/30/2015,2.308 98 | 11/23/2015,2.338 99 | 11/16/2015,2.42 100 | 11/9/2015,2.468 101 | 11/2/2015,2.455 102 | 10/26/2015,2.46 103 | 10/19/2015,2.505 104 | 10/12/2015,2.561 105 | 10/5/2015,2.545 106 | 09/28/2015,2.551 107 | 09/21/2015,2.561 108 | 09/14/2015,2.605 109 | 09/7/2015,2.662 110 | 08/31/2015,2.734 111 | 08/24/2015,2.854 112 | 08/17/2015,2.927 113 | 08/10/2015,2.85 114 | 08/3/2015,2.909 115 | 07/27/2015,2.96 116 | 07/20/2015,3.012 117 | 07/13/2015,3.044 118 | 07/6/2015,2.99 119 | 06/29/2015,2.997 120 | 06/22/2015,3.006 121 | 06/15/2015,3.025 122 | 06/8/2015,2.977 123 | 06/1/2015,2.978 124 | 05/25/2015,2.975 125 | 05/18/2015,2.949 126 | 05/11/2015,2.9 127 | 05/4/2015,2.87 128 | 04/27/2015,2.777 129 | 04/20/2015,2.686 130 | 04/13/2015,2.616 131 | 04/6/2015,2.617 132 | 03/30/2015,2.649 133 | 03/23/2015,2.65 134 | 03/16/2015,2.652 135 | 03/9/2015,2.686 136 | 03/2/2015,2.671 137 | 02/23/2015,2.526 138 | 02/16/2015,2.467 139 | 02/9/2015,2.388 140 | 02/2/2015,2.268 141 | 01/26/2015,2.25 142 | 01/19/2015,2.277 143 | 01/12/2015,2.358 144 | 01/5/2015,2.437 145 | 12/29/2014,2.517 146 | 12/22/2014,2.619 147 | 12/15/2014,2.763 148 | 12/8/2014,2.882 149 | 12/1/2014,2.978 150 | 11/24/2014,3.019 151 | 11/17/2014,3.088 152 | 11/10/2014,3.134 153 | 11/3/2014,3.187 154 | 10/27/2014,3.248 155 | 10/20/2014,3.319 156 | 10/13/2014,3.406 157 | 10/6/2014,3.492 158 | 09/29/2014,3.537 159 | 09/22/2014,3.536 160 | 09/15/2014,3.585 161 | 09/8/2014,3.632 162 | 09/1/2014,3.638 163 | 08/25/2014,3.635 164 | 08/18/2014,3.653 165 | 08/11/2014,3.684 166 | 08/4/2014,3.701 167 | 07/28/2014,3.723 168 | 07/21/2014,3.773 169 | 07/14/2014,3.811 170 | 07/7/2014,3.849 171 | 06/30/2014,3.872 172 | 06/23/2014,3.873 173 | 06/16/2014,3.853 174 | 06/9/2014,3.844 175 | 06/2/2014,3.862 176 | 05/26/2014,3.85 177 | 05/19/2014,3.844 178 | 05/12/2014,3.85 179 | 05/5/2014,3.864 180 | 04/28/2014,3.888 181 | 04/21/2014,3.857 182 | 04/14/2014,3.823 183 | 04/7/2014,3.769 184 | 03/31/2014,3.743 185 | 03/24/2014,3.716 186 | 03/17/2014,3.71 187 | 03/10/2014,3.674 188 | 03/3/2014,3.648 189 | 02/24/2014,3.615 190 | 02/17/2014,3.555 191 | 02/10/2014,3.487 192 | 02/3/2014,3.475 193 | 01/27/2014,3.474 194 | 01/20/2014,3.477 195 | 01/13/2014,3.505 196 | 01/6/2014,3.513 197 | 12/30/2013,3.503 198 | 12/23/2013,3.451 199 | 12/16/2013,3.423 200 | 12/9/2013,3.453 201 | 12/2/2013,3.457 202 | 11/25/2013,3.47 203 | 11/18/2013,3.401 204 | 11/11/2013,3.38 205 | 11/4/2013,3.441 206 | 10/28/2013,3.475 207 | 10/21/2013,3.531 208 | 10/14/2013,3.527 209 | 10/7/2013,3.535 210 | 09/30/2013,3.596 211 | 09/23/2013,3.656 212 | 09/16/2013,3.709 213 | 09/9/2013,3.741 214 | 09/2/2013,3.76 215 | 08/26/2013,3.707 216 | 08/19/2013,3.707 217 | 08/12/2013,3.719 218 | 08/5/2013,3.781 219 | 07/29/2013,3.801 220 | 07/22/2013,3.831 221 | 07/15/2013,3.786 222 | 07/8/2013,3.654 223 | 07/1/2013,3.66 224 | 06/24/2013,3.733 225 | 06/17/2013,3.764 226 | 06/10/2013,3.783 227 | 06/3/2013,3.773 228 | 05/27/2013,3.779 229 | 05/20/2013,3.801 230 | 05/13/2013,3.739 231 | 05/6/2013,3.681 232 | 04/29/2013,3.668 233 | 04/22/2013,3.687 234 | 04/15/2013,3.7 235 | 04/8/2013,3.761 236 | 04/1/2013,3.798 237 | 03/25/2013,3.828 238 | 03/18/2013,3.85 239 | 03/11/2013,3.865 240 | 03/4/2013,3.91 241 | 02/25/2013,3.934 242 | 02/18/2013,3.891 243 | 02/11/2013,3.756 244 | 02/4/2013,3.683 245 | 01/28/2013,3.512 246 | 01/21/2013,3.473 247 | 01/14/2013,3.467 248 | 01/7/2013,3.463 249 | 12/31/2012,3.455 250 | 12/24/2012,3.415 251 | 12/17/2012,3.409 252 | 12/10/2012,3.504 253 | 12/3/2012,3.548 254 | 11/26/2012,3.585 255 | 11/19/2012,3.579 256 | 11/12/2012,3.605 257 | 11/5/2012,3.652 258 | 10/29/2012,3.733 259 | 10/22/2012,3.85 260 | 10/15/2012,3.976 261 | 10/8/2012,4.002 262 | 10/1/2012,3.944 263 | 09/24/2012,3.966 264 | 09/17/2012,4.013 265 | 09/10/2012,3.981 266 | 09/3/2012,3.975 267 | 08/27/2012,3.909 268 | 08/20/2012,3.874 269 | 08/13/2012,3.847 270 | 08/6/2012,3.767 271 | 07/30/2012,3.639 272 | 07/23/2012,3.626 273 | 07/16/2012,3.551 274 | 07/9/2012,3.539 275 | 07/2/2012,3.489 276 | 06/25/2012,3.568 277 | 06/18/2012,3.661 278 | 06/11/2012,3.703 279 | 06/4/2012,3.75 280 | 05/28/2012,3.805 281 | 05/21/2012,3.85 282 | 05/14/2012,3.895 283 | 05/7/2012,3.923 284 | 04/30/2012,3.962 285 | 04/23/2012,3.999 286 | 04/16/2012,4.047 287 | 04/9/2012,4.067 288 | 04/2/2012,4.063 289 | 03/26/2012,4.042 290 | 03/19/2012,3.993 291 | 03/12/2012,3.954 292 | 03/5/2012,3.92 293 | 02/27/2012,3.855 294 | 02/20/2012,3.729 295 | 02/13/2012,3.659 296 | 02/6/2012,3.614 297 | 01/30/2012,3.573 298 | 01/23/2012,3.522 299 | 01/16/2012,3.522 300 | 01/9/2012,3.512 301 | 01/2/2012,3.429 302 | 12/26/2011,3.388 303 | 12/19/2011,3.368 304 | 12/12/2011,3.421 305 | 12/5/2011,3.426 306 | 11/28/2011,3.447 307 | 11/21/2011,3.503 308 | 11/14/2011,3.571 309 | 11/7/2011,3.558 310 | 10/31/2011,3.587 311 | 10/24/2011,3.594 312 | 10/17/2011,3.604 313 | 10/10/2011,3.551 314 | 10/3/2011,3.569 315 | 09/26/2011,3.642 316 | 09/19/2011,3.727 317 | 09/12/2011,3.78 318 | 09/5/2011,3.791 319 | 08/29/2011,3.746 320 | 08/22/2011,3.703 321 | 08/15/2011,3.728 322 | 08/8/2011,3.794 323 | 08/1/2011,3.829 324 | 07/25/2011,3.819 325 | 07/18/2011,3.796 326 | 07/11/2011,3.756 327 | 07/4/2011,3.699 328 | 06/27/2011,3.7 329 | 06/20/2011,3.776 330 | 06/13/2011,3.829 331 | 06/6/2011,3.891 332 | 05/30/2011,3.914 333 | 05/23/2011,3.975 334 | 05/16/2011,4.079 335 | 05/9/2011,4.081 336 | 05/2/2011,4.075 337 | 04/25/2011,3.994 338 | 04/18/2011,3.96 339 | 04/11/2011,3.907 340 | 04/4/2011,3.801 341 | 03/28/2011,3.718 342 | 03/21/2011,3.686 343 | 03/14/2011,3.69 344 | 03/7/2011,3.636 345 | 02/28/2011,3.499 346 | 02/21/2011,3.311 347 | 02/14/2011,3.259 348 | 02/7/2011,3.251 349 | 01/31/2011,3.221 350 | 01/24/2011,3.227 351 | 01/17/2011,3.222 352 | 01/10/2011,3.204 353 | 01/3/2011,3.188 354 | 12/27/2010,3.171 355 | 12/20/2010,3.104 356 | 12/13/2010,3.101 357 | 12/6/2010,3.079 358 | 11/29/2010,2.982 359 | 11/22/2010,2.999 360 | 11/15/2010,3.007 361 | 11/8/2010,2.979 362 | 11/1/2010,2.929 363 | 10/25/2010,2.938 364 | 10/18/2010,2.953 365 | 10/11/2010,2.934 366 | 10/4/2010,2.85 367 | 09/27/2010,2.818 368 | 09/20/2010,2.844 369 | 09/13/2010,2.836 370 | 09/6/2010,2.803 371 | 08/30/2010,2.806 372 | 08/23/2010,2.831 373 | 08/16/2010,2.869 374 | 08/9/2010,2.903 375 | 08/2/2010,2.856 376 | 07/26/2010,2.867 377 | 07/19/2010,2.843 378 | 07/12/2010,2.838 379 | 07/5/2010,2.846 380 | 06/28/2010,2.873 381 | 06/21/2010,2.861 382 | 06/14/2010,2.825 383 | 06/7/2010,2.849 384 | 05/31/2010,2.855 385 | 05/24/2010,2.914 386 | 05/17/2010,2.985 387 | 05/10/2010,3.023 388 | 05/3/2010,3.011 389 | 04/26/2010,2.966 390 | 04/19/2010,2.974 391 | 04/12/2010,2.972 392 | 04/5/2010,2.94 393 | 03/29/2010,2.918 394 | 03/22/2010,2.936 395 | 03/15/2010,2.908 396 | 03/8/2010,2.871 397 | 03/1/2010,2.827 398 | 02/22/2010,2.778 399 | 02/15/2010,2.738 400 | 02/8/2010,2.778 401 | 02/1/2010,2.787 402 | 01/25/2010,2.832 403 | 01/18/2010,2.861 404 | 01/11/2010,2.869 405 | 01/4/2010,2.784 406 | 12/28/2009,2.731 407 | 12/21/2009,2.717 408 | 12/14/2009,2.727 409 | 12/7/2009,2.761 410 | 11/30/2009,2.754 411 | 11/23/2009,2.764 412 | 11/16/2009,2.755 413 | 11/9/2009,2.787 414 | 11/2/2009,2.812 415 | 10/26/2009,2.792 416 | 10/19/2009,2.694 417 | 10/12/2009,2.614 418 | 10/5/2009,2.6 419 | 09/28/2009,2.631 420 | 09/21/2009,2.68 421 | 09/14/2009,2.704 422 | 09/7/2009,2.711 423 | 08/31/2009,2.739 424 | 08/24/2009,2.751 425 | 08/17/2009,2.761 426 | 08/10/2009,2.767 427 | 08/3/2009,2.676 428 | 07/27/2009,2.625 429 | 07/20/2009,2.591 430 | 07/13/2009,2.656 431 | 07/6/2009,2.736 432 | 06/29/2009,2.763 433 | 06/22/2009,2.808 434 | 06/15/2009,2.784 435 | 06/8/2009,2.731 436 | 06/1/2009,2.63 437 | 05/25/2009,2.547 438 | 05/18/2009,2.424 439 | 05/11/2009,2.352 440 | 05/4/2009,2.195 441 | 04/27/2009,2.171 442 | 04/20/2009,2.181 443 | 04/13/2009,2.172 444 | 04/6/2009,2.158 445 | 03/30/2009,2.163 446 | 03/23/2009,2.079 447 | 03/16/2009,2.034 448 | 03/9/2009,2.059 449 | 03/2/2009,2.057 450 | 02/23/2009,2.032 451 | 02/16/2009,2.083 452 | 02/9/2009,2.044 453 | 02/2/2009,2.007 454 | 01/26/2009,1.954 455 | 01/19/2009,1.961 456 | 01/12/2009,1.9 457 | 01/5/2009,1.8 458 | 12/29/2008,1.743 459 | 12/22/2008,1.781 460 | 12/15/2008,1.785 461 | 12/8/2008,1.832 462 | 12/1/2008,1.945 463 | 11/24/2008,2.029 464 | 11/17/2008,2.211 465 | 11/10/2008,2.363 466 | 11/3/2008,2.543 467 | 10/27/2008,2.8 468 | 10/20/2008,3.053 469 | 10/13/2008,3.296 470 | 10/6/2008,3.618 471 | 09/29/2008,3.755 472 | 09/22/2008,3.839 473 | 09/15/2008,3.948 474 | 09/8/2008,3.769 475 | 09/1/2008,3.802 476 | 08/25/2008,3.806 477 | 08/18/2008,3.862 478 | 08/11/2008,3.932 479 | 08/4/2008,4.006 480 | 07/28/2008,4.082 481 | 07/21/2008,4.186 482 | 07/14/2008,4.228 483 | 07/7/2008,4.229 484 | 06/30/2008,4.209 485 | 06/23/2008,4.197 486 | 06/16/2008,4.199 487 | 06/9/2008,4.152 488 | 06/2/2008,4.086 489 | 05/26/2008,4.045 490 | 05/19/2008,3.897 491 | 05/12/2008,3.83 492 | 05/5/2008,3.725 493 | 04/28/2008,3.716 494 | 04/21/2008,3.621 495 | 04/14/2008,3.502 496 | 04/7/2008,3.444 497 | 03/31/2008,3.405 498 | 03/24/2008,3.378 499 | 03/17/2008,3.398 500 | 03/10/2008,3.334 501 | 03/3/2008,3.277 502 | 02/25/2008,3.243 503 | 02/18/2008,3.153 504 | 02/11/2008,3.074 505 | 02/4/2008,3.094 506 | 01/28/2008,3.097 507 | 01/21/2008,3.136 508 | 01/14/2008,3.185 509 | 01/7/2008,3.22 510 | 12/31/2007,3.167 511 | 12/24/2007,3.099 512 | 12/17/2007,3.116 513 | 12/10/2007,3.121 514 | 12/3/2007,3.178 515 | 11/26/2007,3.209 516 | 11/19/2007,3.208 517 | 11/12/2007,3.218 518 | 11/5/2007,3.117 519 | 10/29/2007,2.983 520 | 10/22/2007,2.937 521 | 10/15/2007,2.879 522 | 10/8/2007,2.887 523 | 10/1/2007,2.903 524 | 09/24/2007,2.917 525 | 09/17/2007,2.892 526 | 09/10/2007,2.912 527 | 09/3/2007,2.89 528 | 08/27/2007,2.851 529 | 08/20/2007,2.886 530 | 08/13/2007,2.88 531 | 08/6/2007,2.951 532 | 07/30/2007,2.987 533 | 07/23/2007,3.062 534 | 07/16/2007,3.143 535 | 07/9/2007,3.077 536 | 07/2/2007,3.064 537 | 06/25/2007,3.089 538 | 06/18/2007,3.116 539 | 06/11/2007,3.185 540 | 06/4/2007,3.255 541 | 05/28/2007,3.302 542 | 05/21/2007,3.308 543 | 05/14/2007,3.197 544 | 05/7/2007,3.155 545 | 04/30/2007,3.079 546 | 04/23/2007,2.98 547 | 04/16/2007,2.983 548 | 04/9/2007,2.909 549 | 04/2/2007,2.814 550 | 03/26/2007,2.716 551 | 03/19/2007,2.688 552 | 03/12/2007,2.667 553 | 03/5/2007,2.609 554 | 02/26/2007,2.488 555 | 02/19/2007,2.401 556 | 02/12/2007,2.35 557 | 02/5/2007,2.3 558 | 01/29/2007,2.277 559 | 01/22/2007,2.285 560 | 01/15/2007,2.347 561 | 01/8/2007,2.418 562 | 01/1/2007,2.442 563 | -------------------------------------------------------------------------------- /notebooks/data/gas prices/premium.csv: -------------------------------------------------------------------------------- 1 | Week,Premium 2 | 09/25/2017,3.105 3 | 09/18/2017,3.151 4 | 09/11/2017,3.197 5 | 09/4/2017,3.191 6 | 08/28/2017,2.901 7 | 08/21/2017,2.865 8 | 08/14/2017,2.886 9 | 08/7/2017,2.882 10 | 07/31/2017,2.86 11 | 07/24/2017,2.816 12 | 07/17/2017,2.781 13 | 07/10/2017,2.798 14 | 07/3/2017,2.77 15 | 06/26/2017,2.799 16 | 06/19/2017,2.825 17 | 06/12/2017,2.865 18 | 06/5/2017,2.906 19 | 05/29/2017,2.894 20 | 05/22/2017,2.889 21 | 05/15/2017,2.867 22 | 05/8/2017,2.87 23 | 05/1/2017,2.907 24 | 04/24/2017,2.938 25 | 04/17/2017,2.927 26 | 04/10/2017,2.912 27 | 04/3/2017,2.851 28 | 03/27/2017,2.812 29 | 03/20/2017,2.816 30 | 03/13/2017,2.816 31 | 03/6/2017,2.833 32 | 02/27/2017,2.812 33 | 02/20/2017,2.798 34 | 02/13/2017,2.801 35 | 02/6/2017,2.79 36 | 01/30/2017,2.795 37 | 01/23/2017,2.817 38 | 01/16/2017,2.845 39 | 01/9/2017,2.874 40 | 01/2/2017,2.865 41 | 12/26/2016,2.799 42 | 12/19/2016,2.761 43 | 12/12/2016,2.732 44 | 12/5/2016,2.71 45 | 11/28/2016,2.657 46 | 11/21/2016,2.66 47 | 11/14/2016,2.691 48 | 11/7/2016,2.732 49 | 10/31/2016,2.719 50 | 10/24/2016,2.73 51 | 10/17/2016,2.742 52 | 10/10/2016,2.754 53 | 10/3/2016,2.726 54 | 09/26/2016,2.708 55 | 09/19/2016,2.706 56 | 09/12/2016,2.68 57 | 09/5/2016,2.698 58 | 08/29/2016,2.701 59 | 08/22/2016,2.664 60 | 08/15/2016,2.622 61 | 08/8/2016,2.621 62 | 08/1/2016,2.635 63 | 07/25/2016,2.656 64 | 07/18/2016,2.701 65 | 07/11/2016,2.721 66 | 07/4/2016,2.755 67 | 06/27/2016,2.785 68 | 06/20/2016,2.805 69 | 06/13/2016,2.842 70 | 06/6/2016,2.83 71 | 05/30/2016,2.788 72 | 05/23/2016,2.756 73 | 05/16/2016,2.7 74 | 05/9/2016,2.683 75 | 05/2/2016,2.693 76 | 04/25/2016,2.616 77 | 04/18/2016,2.59 78 | 04/11/2016,2.527 79 | 04/4/2016,2.532 80 | 03/28/2016,2.521 81 | 03/21/2016,2.461 82 | 03/14/2016,2.409 83 | 03/7/2016,2.294 84 | 02/29/2016,2.244 85 | 02/22/2016,2.205 86 | 02/15/2016,2.209 87 | 02/8/2016,2.247 88 | 02/1/2016,2.307 89 | 01/25/2016,2.337 90 | 01/18/2016,2.39 91 | 01/11/2016,2.469 92 | 01/4/2016,2.498 93 | 12/28/2015,2.506 94 | 12/21/2015,2.499 95 | 12/14/2015,2.509 96 | 12/7/2015,2.523 97 | 11/30/2015,2.529 98 | 11/23/2015,2.556 99 | 11/16/2015,2.633 100 | 11/9/2015,2.678 101 | 11/2/2015,2.66 102 | 10/26/2015,2.663 103 | 10/19/2015,2.705 104 | 10/12/2015,2.757 105 | 10/5/2015,2.748 106 | 09/28/2015,2.748 107 | 09/21/2015,2.759 108 | 09/14/2015,2.801 109 | 09/7/2015,2.853 110 | 08/31/2015,2.916 111 | 08/24/2015,3.027 112 | 08/17/2015,3.096 113 | 08/10/2015,3.03 114 | 08/3/2015,3.083 115 | 07/27/2015,3.129 116 | 07/20/2015,3.179 117 | 07/13/2015,3.213 118 | 07/6/2015,3.168 119 | 06/29/2015,3.175 120 | 06/22/2015,3.182 121 | 06/15/2015,3.202 122 | 06/8/2015,3.15 123 | 06/1/2015,3.143 124 | 05/25/2015,3.14 125 | 05/18/2015,3.109 126 | 05/11/2015,3.063 127 | 05/4/2015,3.036 128 | 04/27/2015,2.947 129 | 04/20/2015,2.857 130 | 04/13/2015,2.786 131 | 04/6/2015,2.789 132 | 03/30/2015,2.814 133 | 03/23/2015,2.817 134 | 03/16/2015,2.824 135 | 03/9/2015,2.853 136 | 03/2/2015,2.837 137 | 02/23/2015,2.704 138 | 02/16/2015,2.651 139 | 02/9/2015,2.568 140 | 02/2/2015,2.454 141 | 01/26/2015,2.444 142 | 01/19/2015,2.473 143 | 01/12/2015,2.553 144 | 01/5/2015,2.631 145 | 12/29/2014,2.713 146 | 12/22/2014,2.813 147 | 12/15/2014,2.951 148 | 12/8/2014,3.072 149 | 12/1/2014,3.164 150 | 11/24/2014,3.205 151 | 11/17/2014,3.27 152 | 11/10/2014,3.315 153 | 11/3/2014,3.369 154 | 10/27/2014,3.425 155 | 10/20/2014,3.499 156 | 10/13/2014,3.581 157 | 10/6/2014,3.667 158 | 09/29/2014,3.71 159 | 09/22/2014,3.707 160 | 09/15/2014,3.754 161 | 09/8/2014,3.801 162 | 09/1/2014,3.803 163 | 08/25/2014,3.8 164 | 08/18/2014,3.816 165 | 08/11/2014,3.85 166 | 08/4/2014,3.866 167 | 07/28/2014,3.888 168 | 07/21/2014,3.938 169 | 07/14/2014,3.978 170 | 07/7/2014,4.015 171 | 06/30/2014,4.036 172 | 06/23/2014,4.036 173 | 06/16/2014,4.016 174 | 06/9/2014,4.008 175 | 06/2/2014,4.024 176 | 05/26/2014,4.014 177 | 05/19/2014,4.011 178 | 05/12/2014,4.015 179 | 05/5/2014,4.027 180 | 04/28/2014,4.047 181 | 04/21/2014,4.014 182 | 04/14/2014,3.976 183 | 04/7/2014,3.928 184 | 03/31/2014,3.904 185 | 03/24/2014,3.876 186 | 03/17/2014,3.871 187 | 03/10/2014,3.835 188 | 03/3/2014,3.812 189 | 02/24/2014,3.783 190 | 02/17/2014,3.728 191 | 02/10/2014,3.664 192 | 02/3/2014,3.651 193 | 01/27/2014,3.654 194 | 01/20/2014,3.657 195 | 01/13/2014,3.683 196 | 01/6/2014,3.69 197 | 12/30/2013,3.682 198 | 12/23/2013,3.632 199 | 12/16/2013,3.605 200 | 12/9/2013,3.632 201 | 12/2/2013,3.635 202 | 11/25/2013,3.649 203 | 11/18/2013,3.573 204 | 11/11/2013,3.552 205 | 11/4/2013,3.614 206 | 10/28/2013,3.644 207 | 10/21/2013,3.696 208 | 10/14/2013,3.694 209 | 10/7/2013,3.701 210 | 09/30/2013,3.758 211 | 09/23/2013,3.819 212 | 09/16/2013,3.87 213 | 09/9/2013,3.906 214 | 09/2/2013,3.922 215 | 08/26/2013,3.875 216 | 08/19/2013,3.874 217 | 08/12/2013,3.886 218 | 08/5/2013,3.947 219 | 07/29/2013,3.963 220 | 07/22/2013,3.993 221 | 07/15/2013,3.943 222 | 07/8/2013,3.81 223 | 07/1/2013,3.813 224 | 06/24/2013,3.88 225 | 06/17/2013,3.912 226 | 06/10/2013,3.929 227 | 06/3/2013,3.913 228 | 05/27/2013,3.912 229 | 05/20/2013,3.926 230 | 05/13/2013,3.883 231 | 05/6/2013,3.83 232 | 04/29/2013,3.822 233 | 04/22/2013,3.836 234 | 04/15/2013,3.852 235 | 04/8/2013,3.916 236 | 04/1/2013,3.953 237 | 03/25/2013,3.981 238 | 03/18/2013,4.002 239 | 03/11/2013,4.018 240 | 03/4/2013,4.061 241 | 02/25/2013,4.084 242 | 02/18/2013,4.042 243 | 02/11/2013,3.91 244 | 02/4/2013,3.841 245 | 01/28/2013,3.673 246 | 01/21/2013,3.636 247 | 01/14/2013,3.637 248 | 01/7/2013,3.631 249 | 12/31/2012,3.617 250 | 12/24/2012,3.576 251 | 12/17/2012,3.571 252 | 12/10/2012,3.664 253 | 12/3/2012,3.707 254 | 11/26/2012,3.746 255 | 11/19/2012,3.74 256 | 11/12/2012,3.761 257 | 11/5/2012,3.808 258 | 10/29/2012,3.878 259 | 10/22/2012,3.992 260 | 10/15/2012,4.113 261 | 10/8/2012,4.133 262 | 10/1/2012,4.087 263 | 09/24/2012,4.11 264 | 09/17/2012,4.154 265 | 09/10/2012,4.119 266 | 09/3/2012,4.111 267 | 08/27/2012,4.051 268 | 08/20/2012,4.014 269 | 08/13/2012,3.985 270 | 08/6/2012,3.907 271 | 07/30/2012,3.779 272 | 07/23/2012,3.765 273 | 07/16/2012,3.69 274 | 07/9/2012,3.674 275 | 07/2/2012,3.618 276 | 06/25/2012,3.693 277 | 06/18/2012,3.78 278 | 06/11/2012,3.829 279 | 06/4/2012,3.871 280 | 05/28/2012,3.929 281 | 05/21/2012,3.975 282 | 05/14/2012,4.02 283 | 05/7/2012,4.054 284 | 04/30/2012,4.097 285 | 04/23/2012,4.136 286 | 04/16/2012,4.183 287 | 04/9/2012,4.201 288 | 04/2/2012,4.193 289 | 03/26/2012,4.168 290 | 03/19/2012,4.117 291 | 03/12/2012,4.077 292 | 03/5/2012,4.043 293 | 02/27/2012,3.983 294 | 02/20/2012,3.865 295 | 02/13/2012,3.798 296 | 02/6/2012,3.756 297 | 01/30/2012,3.716 298 | 01/23/2012,3.664 299 | 01/16/2012,3.66 300 | 01/9/2012,3.649 301 | 01/2/2012,3.567 302 | 12/26/2011,3.524 303 | 12/19/2011,3.504 304 | 12/12/2011,3.554 305 | 12/5/2011,3.56 306 | 11/28/2011,3.581 307 | 11/21/2011,3.634 308 | 11/14/2011,3.697 309 | 11/7/2011,3.683 310 | 10/31/2011,3.713 311 | 10/24/2011,3.721 312 | 10/17/2011,3.73 313 | 10/10/2011,3.679 314 | 10/3/2011,3.698 315 | 09/26/2011,3.77 316 | 09/19/2011,3.853 317 | 09/12/2011,3.904 318 | 09/5/2011,3.914 319 | 08/29/2011,3.874 320 | 08/22/2011,3.839 321 | 08/15/2011,3.865 322 | 08/8/2011,3.927 323 | 08/1/2011,3.963 324 | 07/25/2011,3.951 325 | 07/18/2011,3.932 326 | 07/11/2011,3.889 327 | 07/4/2011,3.829 328 | 06/27/2011,3.833 329 | 06/20/2011,3.904 330 | 06/13/2011,3.958 331 | 06/6/2011,4.02 332 | 05/30/2011,4.041 333 | 05/23/2011,4.1 334 | 05/16/2011,4.204 335 | 05/9/2011,4.206 336 | 05/2/2011,4.198 337 | 04/25/2011,4.117 338 | 04/18/2011,4.08 339 | 04/11/2011,4.027 340 | 04/4/2011,3.921 341 | 03/28/2011,3.836 342 | 03/21/2011,3.806 343 | 03/14/2011,3.809 344 | 03/7/2011,3.758 345 | 02/28/2011,3.62 346 | 02/21/2011,3.428 347 | 02/14/2011,3.382 348 | 02/7/2011,3.371 349 | 01/31/2011,3.345 350 | 01/24/2011,3.353 351 | 01/17/2011,3.347 352 | 01/10/2011,3.33 353 | 01/3/2011,3.314 354 | 12/27/2010,3.296 355 | 12/20/2010,3.231 356 | 12/13/2010,3.227 357 | 12/6/2010,3.207 358 | 11/29/2010,3.108 359 | 11/22/2010,3.124 360 | 11/15/2010,3.13 361 | 11/8/2010,3.102 362 | 11/1/2010,3.051 363 | 10/25/2010,3.058 364 | 10/18/2010,3.071 365 | 10/11/2010,3.053 366 | 10/4/2010,2.966 367 | 09/27/2010,2.932 368 | 09/20/2010,2.954 369 | 09/13/2010,2.95 370 | 09/6/2010,2.917 371 | 08/30/2010,2.922 372 | 08/23/2010,2.945 373 | 08/16/2010,2.982 374 | 08/9/2010,3.016 375 | 08/2/2010,2.973 376 | 07/26/2010,2.982 377 | 07/19/2010,2.958 378 | 07/12/2010,2.956 379 | 07/5/2010,2.964 380 | 06/28/2010,2.992 381 | 06/21/2010,2.98 382 | 06/14/2010,2.947 383 | 06/7/2010,2.972 384 | 05/31/2010,2.98 385 | 05/24/2010,3.037 386 | 05/17/2010,3.107 387 | 05/10/2010,3.142 388 | 05/3/2010,3.131 389 | 04/26/2010,3.083 390 | 04/19/2010,3.091 391 | 04/12/2010,3.088 392 | 04/5/2010,3.056 393 | 03/29/2010,3.034 394 | 03/22/2010,3.05 395 | 03/15/2010,3.024 396 | 03/8/2010,2.988 397 | 03/1/2010,2.943 398 | 02/22/2010,2.899 399 | 02/15/2010,2.862 400 | 02/8/2010,2.9 401 | 02/1/2010,2.911 402 | 01/25/2010,2.953 403 | 01/18/2010,2.983 404 | 01/11/2010,2.988 405 | 01/4/2010,2.905 406 | 12/28/2009,2.853 407 | 12/21/2009,2.839 408 | 12/14/2009,2.849 409 | 12/7/2009,2.882 410 | 11/30/2009,2.875 411 | 11/23/2009,2.883 412 | 11/16/2009,2.877 413 | 11/9/2009,2.908 414 | 11/2/2009,2.93 415 | 10/26/2009,2.909 416 | 10/19/2009,2.807 417 | 10/12/2009,2.727 418 | 10/5/2009,2.711 419 | 09/28/2009,2.741 420 | 09/21/2009,2.793 421 | 09/14/2009,2.818 422 | 09/7/2009,2.831 423 | 08/31/2009,2.857 424 | 08/24/2009,2.869 425 | 08/17/2009,2.877 426 | 08/10/2009,2.883 427 | 08/3/2009,2.793 428 | 07/27/2009,2.744 429 | 07/20/2009,2.714 430 | 07/13/2009,2.779 431 | 07/6/2009,2.855 432 | 06/29/2009,2.883 433 | 06/22/2009,2.924 434 | 06/15/2009,2.896 435 | 06/8/2009,2.843 436 | 06/1/2009,2.741 437 | 05/25/2009,2.661 438 | 05/18/2009,2.54 439 | 05/11/2009,2.467 440 | 05/4/2009,2.308 441 | 04/27/2009,2.285 442 | 04/20/2009,2.294 443 | 04/13/2009,2.284 444 | 04/6/2009,2.271 445 | 03/30/2009,2.275 446 | 03/23/2009,2.193 447 | 03/16/2009,2.151 448 | 03/9/2009,2.175 449 | 03/2/2009,2.174 450 | 02/23/2009,2.153 451 | 02/16/2009,2.198 452 | 02/9/2009,2.161 453 | 02/2/2009,2.126 454 | 01/26/2009,2.07 455 | 01/19/2009,2.077 456 | 01/12/2009,2.015 457 | 01/5/2009,1.922 458 | 12/29/2008,1.866 459 | 12/22/2008,1.907 460 | 12/15/2008,1.915 461 | 12/8/2008,1.965 462 | 12/1/2008,2.077 463 | 11/24/2008,2.163 464 | 11/17/2008,2.339 465 | 11/10/2008,2.494 466 | 11/3/2008,2.677 467 | 10/27/2008,2.929 468 | 10/20/2008,3.182 469 | 10/13/2008,3.425 470 | 10/6/2008,3.746 471 | 09/29/2008,3.883 472 | 09/22/2008,3.963 473 | 09/15/2008,4.073 474 | 09/8/2008,3.885 475 | 09/1/2008,3.918 476 | 08/25/2008,3.922 477 | 08/18/2008,3.979 478 | 08/11/2008,4.055 479 | 08/4/2008,4.13 480 | 07/28/2008,4.205 481 | 07/21/2008,4.303 482 | 07/14/2008,4.341 483 | 07/7/2008,4.344 484 | 06/30/2008,4.326 485 | 06/23/2008,4.312 486 | 06/16/2008,4.314 487 | 06/9/2008,4.267 488 | 06/2/2008,4.201 489 | 05/26/2008,4.159 490 | 05/19/2008,4.017 491 | 05/12/2008,3.944 492 | 05/5/2008,3.842 493 | 04/28/2008,3.829 494 | 04/21/2008,3.729 495 | 04/14/2008,3.607 496 | 04/7/2008,3.55 497 | 03/31/2008,3.512 498 | 03/24/2008,3.486 499 | 03/17/2008,3.5 500 | 03/10/2008,3.443 501 | 03/3/2008,3.386 502 | 02/25/2008,3.354 503 | 02/18/2008,3.266 504 | 02/11/2008,3.19 505 | 02/4/2008,3.212 506 | 01/28/2008,3.217 507 | 01/21/2008,3.256 508 | 01/14/2008,3.3 509 | 01/7/2008,3.335 510 | 12/31/2007,3.283 511 | 12/24/2007,3.214 512 | 12/17/2007,3.232 513 | 12/10/2007,3.238 514 | 12/3/2007,3.292 515 | 11/26/2007,3.319 516 | 11/19/2007,3.32 517 | 11/12/2007,3.325 518 | 11/5/2007,3.224 519 | 10/29/2007,3.092 520 | 10/22/2007,3.046 521 | 10/15/2007,2.99 522 | 10/8/2007,2.997 523 | 10/1/2007,3.013 524 | 09/24/2007,3.029 525 | 09/17/2007,3.001 526 | 09/10/2007,3.018 527 | 09/3/2007,2.997 528 | 08/27/2007,2.963 529 | 08/20/2007,2.997 530 | 08/13/2007,2.995 531 | 08/6/2007,3.062 532 | 07/30/2007,3.099 533 | 07/23/2007,3.168 534 | 07/16/2007,3.242 535 | 07/9/2007,3.182 536 | 07/2/2007,3.168 537 | 06/25/2007,3.196 538 | 06/18/2007,3.222 539 | 06/11/2007,3.281 540 | 06/4/2007,3.351 541 | 05/28/2007,3.395 542 | 05/21/2007,3.398 543 | 05/14/2007,3.284 544 | 05/7/2007,3.247 545 | 04/30/2007,3.176 546 | 04/23/2007,3.082 547 | 04/16/2007,3.083 548 | 04/9/2007,3.007 549 | 04/2/2007,2.912 550 | 03/26/2007,2.812 551 | 03/19/2007,2.781 552 | 03/12/2007,2.763 553 | 03/5/2007,2.709 554 | 02/26/2007,2.581 555 | 02/19/2007,2.495 556 | 02/12/2007,2.442 557 | 02/5/2007,2.396 558 | 01/29/2007,2.381 559 | 01/22/2007,2.391 560 | 01/15/2007,2.453 561 | 01/8/2007,2.523 562 | 01/1/2007,2.547 563 | -------------------------------------------------------------------------------- /notebooks/data/gas prices/regular.csv: -------------------------------------------------------------------------------- 1 | Week,Regular 2 | 09/25/2017,2.583 3 | 09/18/2017,2.634 4 | 09/11/2017,2.685 5 | 09/4/2017,2.679 6 | 08/28/2017,2.399 7 | 08/21/2017,2.36 8 | 08/14/2017,2.384 9 | 08/7/2017,2.378 10 | 07/31/2017,2.352 11 | 07/24/2017,2.312 12 | 07/17/2017,2.278 13 | 07/10/2017,2.297 14 | 07/3/2017,2.26 15 | 06/26/2017,2.288 16 | 06/19/2017,2.318 17 | 06/12/2017,2.366 18 | 06/5/2017,2.414 19 | 05/29/2017,2.406 20 | 05/22/2017,2.399 21 | 05/15/2017,2.369 22 | 05/8/2017,2.372 23 | 05/1/2017,2.411 24 | 04/24/2017,2.449 25 | 04/17/2017,2.436 26 | 04/10/2017,2.424 27 | 04/3/2017,2.36 28 | 03/27/2017,2.315 29 | 03/20/2017,2.321 30 | 03/13/2017,2.323 31 | 03/6/2017,2.341 32 | 02/27/2017,2.314 33 | 02/20/2017,2.302 34 | 02/13/2017,2.307 35 | 02/6/2017,2.293 36 | 01/30/2017,2.296 37 | 01/23/2017,2.326 38 | 01/16/2017,2.358 39 | 01/9/2017,2.388 40 | 01/2/2017,2.377 41 | 12/26/2016,2.309 42 | 12/19/2016,2.264 43 | 12/12/2016,2.236 44 | 12/5/2016,2.208 45 | 11/28/2016,2.154 46 | 11/21/2016,2.155 47 | 11/14/2016,2.184 48 | 11/7/2016,2.233 49 | 10/31/2016,2.23 50 | 10/24/2016,2.243 51 | 10/17/2016,2.257 52 | 10/10/2016,2.272 53 | 10/3/2016,2.245 54 | 09/26/2016,2.224 55 | 09/19/2016,2.225 56 | 09/12/2016,2.202 57 | 09/5/2016,2.223 58 | 08/29/2016,2.237 59 | 08/22/2016,2.193 60 | 08/15/2016,2.149 61 | 08/8/2016,2.15 62 | 08/1/2016,2.159 63 | 07/25/2016,2.182 64 | 07/18/2016,2.23 65 | 07/11/2016,2.253 66 | 07/4/2016,2.291 67 | 06/27/2016,2.329 68 | 06/20/2016,2.353 69 | 06/13/2016,2.399 70 | 06/6/2016,2.381 71 | 05/30/2016,2.339 72 | 05/23/2016,2.3 73 | 05/16/2016,2.242 74 | 05/9/2016,2.22 75 | 05/2/2016,2.24 76 | 04/25/2016,2.162 77 | 04/18/2016,2.137 78 | 04/11/2016,2.069 79 | 04/4/2016,2.083 80 | 03/28/2016,2.066 81 | 03/21/2016,2.007 82 | 03/14/2016,1.961 83 | 03/7/2016,1.841 84 | 02/29/2016,1.783 85 | 02/22/2016,1.73 86 | 02/15/2016,1.724 87 | 02/8/2016,1.759 88 | 02/1/2016,1.822 89 | 01/25/2016,1.856 90 | 01/18/2016,1.914 91 | 01/11/2016,1.996 92 | 01/4/2016,2.028 93 | 12/28/2015,2.034 94 | 12/21/2015,2.026 95 | 12/14/2015,2.037 96 | 12/7/2015,2.053 97 | 11/30/2015,2.059 98 | 11/23/2015,2.094 99 | 11/16/2015,2.178 100 | 11/9/2015,2.235 101 | 11/2/2015,2.224 102 | 10/26/2015,2.228 103 | 10/19/2015,2.277 104 | 10/12/2015,2.337 105 | 10/5/2015,2.318 106 | 09/28/2015,2.322 107 | 09/21/2015,2.327 108 | 09/14/2015,2.375 109 | 09/7/2015,2.437 110 | 08/31/2015,2.51 111 | 08/24/2015,2.637 112 | 08/17/2015,2.716 113 | 08/10/2015,2.629 114 | 08/3/2015,2.689 115 | 07/27/2015,2.745 116 | 07/20/2015,2.802 117 | 07/13/2015,2.834 118 | 07/6/2015,2.793 119 | 06/29/2015,2.801 120 | 06/22/2015,2.812 121 | 06/15/2015,2.835 122 | 06/8/2015,2.78 123 | 06/1/2015,2.78 124 | 05/25/2015,2.774 125 | 05/18/2015,2.744 126 | 05/11/2015,2.691 127 | 05/4/2015,2.664 128 | 04/27/2015,2.57 129 | 04/20/2015,2.485 130 | 04/13/2015,2.408 131 | 04/6/2015,2.413 132 | 03/30/2015,2.448 133 | 03/23/2015,2.457 134 | 03/16/2015,2.453 135 | 03/9/2015,2.487 136 | 03/2/2015,2.473 137 | 02/23/2015,2.332 138 | 02/16/2015,2.274 139 | 02/9/2015,2.191 140 | 02/2/2015,2.068 141 | 01/26/2015,2.044 142 | 01/19/2015,2.066 143 | 01/12/2015,2.139 144 | 01/5/2015,2.214 145 | 12/29/2014,2.299 146 | 12/22/2014,2.403 147 | 12/15/2014,2.554 148 | 12/8/2014,2.679 149 | 12/1/2014,2.778 150 | 11/24/2014,2.821 151 | 11/17/2014,2.894 152 | 11/10/2014,2.941 153 | 11/3/2014,2.993 154 | 10/27/2014,3.056 155 | 10/20/2014,3.12 156 | 10/13/2014,3.207 157 | 10/6/2014,3.299 158 | 09/29/2014,3.354 159 | 09/22/2014,3.353 160 | 09/15/2014,3.408 161 | 09/8/2014,3.457 162 | 09/1/2014,3.459 163 | 08/25/2014,3.454 164 | 08/18/2014,3.472 165 | 08/11/2014,3.505 166 | 08/4/2014,3.515 167 | 07/28/2014,3.539 168 | 07/21/2014,3.593 169 | 07/14/2014,3.635 170 | 07/7/2014,3.678 171 | 06/30/2014,3.704 172 | 06/23/2014,3.704 173 | 06/16/2014,3.686 174 | 06/9/2014,3.674 175 | 06/2/2014,3.69 176 | 05/26/2014,3.674 177 | 05/19/2014,3.665 178 | 05/12/2014,3.668 179 | 05/5/2014,3.684 180 | 04/28/2014,3.713 181 | 04/21/2014,3.683 182 | 04/14/2014,3.651 183 | 04/7/2014,3.596 184 | 03/31/2014,3.579 185 | 03/24/2014,3.549 186 | 03/17/2014,3.547 187 | 03/10/2014,3.512 188 | 03/3/2014,3.479 189 | 02/24/2014,3.444 190 | 02/17/2014,3.38 191 | 02/10/2014,3.309 192 | 02/3/2014,3.292 193 | 01/27/2014,3.295 194 | 01/20/2014,3.296 195 | 01/13/2014,3.327 196 | 01/6/2014,3.332 197 | 12/30/2013,3.331 198 | 12/23/2013,3.271 199 | 12/16/2013,3.239 200 | 12/9/2013,3.269 201 | 12/2/2013,3.272 202 | 11/25/2013,3.293 203 | 11/18/2013,3.219 204 | 11/11/2013,3.194 205 | 11/4/2013,3.265 206 | 10/28/2013,3.294 207 | 10/21/2013,3.36 208 | 10/14/2013,3.354 209 | 10/7/2013,3.367 210 | 09/30/2013,3.425 211 | 09/23/2013,3.495 212 | 09/16/2013,3.547 213 | 09/9/2013,3.587 214 | 09/2/2013,3.608 215 | 08/26/2013,3.552 216 | 08/19/2013,3.55 217 | 08/12/2013,3.561 218 | 08/5/2013,3.632 219 | 07/29/2013,3.646 220 | 07/22/2013,3.682 221 | 07/15/2013,3.639 222 | 07/8/2013,3.492 223 | 07/1/2013,3.496 224 | 06/24/2013,3.577 225 | 06/17/2013,3.626 226 | 06/10/2013,3.655 227 | 06/3/2013,3.646 228 | 05/27/2013,3.645 229 | 05/20/2013,3.673 230 | 05/13/2013,3.603 231 | 05/6/2013,3.538 232 | 04/29/2013,3.52 233 | 04/22/2013,3.536 234 | 04/15/2013,3.542 235 | 04/8/2013,3.608 236 | 04/1/2013,3.645 237 | 03/25/2013,3.68 238 | 03/18/2013,3.696 239 | 03/11/2013,3.71 240 | 03/4/2013,3.759 241 | 02/25/2013,3.784 242 | 02/18/2013,3.747 243 | 02/11/2013,3.611 244 | 02/4/2013,3.538 245 | 01/28/2013,3.357 246 | 01/21/2013,3.315 247 | 01/14/2013,3.303 248 | 01/7/2013,3.299 249 | 12/31/2012,3.298 250 | 12/24/2012,3.257 251 | 12/17/2012,3.254 252 | 12/10/2012,3.349 253 | 12/3/2012,3.394 254 | 11/26/2012,3.437 255 | 11/19/2012,3.429 256 | 11/12/2012,3.449 257 | 11/5/2012,3.492 258 | 10/29/2012,3.568 259 | 10/22/2012,3.687 260 | 10/15/2012,3.819 261 | 10/8/2012,3.85 262 | 10/1/2012,3.804 263 | 09/24/2012,3.826 264 | 09/17/2012,3.878 265 | 09/10/2012,3.847 266 | 09/3/2012,3.843 267 | 08/27/2012,3.776 268 | 08/20/2012,3.744 269 | 08/13/2012,3.721 270 | 08/6/2012,3.645 271 | 07/30/2012,3.508 272 | 07/23/2012,3.494 273 | 07/16/2012,3.427 274 | 07/9/2012,3.411 275 | 07/2/2012,3.356 276 | 06/25/2012,3.437 277 | 06/18/2012,3.533 278 | 06/11/2012,3.572 279 | 06/4/2012,3.613 280 | 05/28/2012,3.67 281 | 05/21/2012,3.715 282 | 05/14/2012,3.754 283 | 05/7/2012,3.79 284 | 04/30/2012,3.83 285 | 04/23/2012,3.87 286 | 04/16/2012,3.922 287 | 04/9/2012,3.939 288 | 04/2/2012,3.941 289 | 03/26/2012,3.918 290 | 03/19/2012,3.867 291 | 03/12/2012,3.829 292 | 03/5/2012,3.793 293 | 02/27/2012,3.721 294 | 02/20/2012,3.591 295 | 02/13/2012,3.523 296 | 02/6/2012,3.482 297 | 01/30/2012,3.439 298 | 01/23/2012,3.389 299 | 01/16/2012,3.391 300 | 01/9/2012,3.382 301 | 01/2/2012,3.299 302 | 12/26/2011,3.258 303 | 12/19/2011,3.229 304 | 12/12/2011,3.286 305 | 12/5/2011,3.29 306 | 11/28/2011,3.307 307 | 11/21/2011,3.368 308 | 11/14/2011,3.436 309 | 11/7/2011,3.424 310 | 10/31/2011,3.452 311 | 10/24/2011,3.462 312 | 10/17/2011,3.476 313 | 10/10/2011,3.417 314 | 10/3/2011,3.433 315 | 09/26/2011,3.509 316 | 09/19/2011,3.601 317 | 09/12/2011,3.661 318 | 09/5/2011,3.674 319 | 08/29/2011,3.627 320 | 08/22/2011,3.581 321 | 08/15/2011,3.604 322 | 08/8/2011,3.674 323 | 08/1/2011,3.711 324 | 07/25/2011,3.699 325 | 07/18/2011,3.682 326 | 07/11/2011,3.641 327 | 07/4/2011,3.579 328 | 06/27/2011,3.574 329 | 06/20/2011,3.652 330 | 06/13/2011,3.713 331 | 06/6/2011,3.781 332 | 05/30/2011,3.794 333 | 05/23/2011,3.849 334 | 05/16/2011,3.96 335 | 05/9/2011,3.965 336 | 05/2/2011,3.963 337 | 04/25/2011,3.879 338 | 04/18/2011,3.844 339 | 04/11/2011,3.791 340 | 04/4/2011,3.684 341 | 03/28/2011,3.596 342 | 03/21/2011,3.562 343 | 03/14/2011,3.567 344 | 03/7/2011,3.52 345 | 02/28/2011,3.383 346 | 02/21/2011,3.189 347 | 02/14/2011,3.14 348 | 02/7/2011,3.132 349 | 01/31/2011,3.101 350 | 01/24/2011,3.11 351 | 01/17/2011,3.104 352 | 01/10/2011,3.089 353 | 01/3/2011,3.07 354 | 12/27/2010,3.052 355 | 12/20/2010,2.982 356 | 12/13/2010,2.98 357 | 12/6/2010,2.958 358 | 11/29/2010,2.856 359 | 11/22/2010,2.876 360 | 11/15/2010,2.892 361 | 11/8/2010,2.865 362 | 11/1/2010,2.806 363 | 10/25/2010,2.817 364 | 10/18/2010,2.834 365 | 10/11/2010,2.819 366 | 10/4/2010,2.732 367 | 09/27/2010,2.694 368 | 09/20/2010,2.723 369 | 09/13/2010,2.721 370 | 09/6/2010,2.682 371 | 08/30/2010,2.682 372 | 08/23/2010,2.704 373 | 08/16/2010,2.745 374 | 08/9/2010,2.783 375 | 08/2/2010,2.735 376 | 07/26/2010,2.749 377 | 07/19/2010,2.722 378 | 07/12/2010,2.718 379 | 07/5/2010,2.726 380 | 06/28/2010,2.757 381 | 06/21/2010,2.743 382 | 06/14/2010,2.701 383 | 06/7/2010,2.725 384 | 05/31/2010,2.728 385 | 05/24/2010,2.786 386 | 05/17/2010,2.864 387 | 05/10/2010,2.905 388 | 05/3/2010,2.898 389 | 04/26/2010,2.849 390 | 04/19/2010,2.86 391 | 04/12/2010,2.858 392 | 04/5/2010,2.826 393 | 03/29/2010,2.798 394 | 03/22/2010,2.819 395 | 03/15/2010,2.788 396 | 03/8/2010,2.751 397 | 03/1/2010,2.702 398 | 02/22/2010,2.655 399 | 02/15/2010,2.608 400 | 02/8/2010,2.652 401 | 02/1/2010,2.661 402 | 01/25/2010,2.705 403 | 01/18/2010,2.739 404 | 01/11/2010,2.751 405 | 01/4/2010,2.665 406 | 12/28/2009,2.607 407 | 12/21/2009,2.589 408 | 12/14/2009,2.599 409 | 12/7/2009,2.634 410 | 11/30/2009,2.629 411 | 11/23/2009,2.639 412 | 11/16/2009,2.629 413 | 11/9/2009,2.666 414 | 11/2/2009,2.694 415 | 10/26/2009,2.674 416 | 10/19/2009,2.574 417 | 10/12/2009,2.489 418 | 10/5/2009,2.468 419 | 09/28/2009,2.499 420 | 09/21/2009,2.552 421 | 09/14/2009,2.577 422 | 09/7/2009,2.588 423 | 08/31/2009,2.613 424 | 08/24/2009,2.628 425 | 08/17/2009,2.637 426 | 08/10/2009,2.647 427 | 08/3/2009,2.557 428 | 07/27/2009,2.503 429 | 07/20/2009,2.463 430 | 07/13/2009,2.528 431 | 07/6/2009,2.612 432 | 06/29/2009,2.642 433 | 06/22/2009,2.691 434 | 06/15/2009,2.672 435 | 06/8/2009,2.624 436 | 06/1/2009,2.524 437 | 05/25/2009,2.435 438 | 05/18/2009,2.309 439 | 05/11/2009,2.24 440 | 05/4/2009,2.078 441 | 04/27/2009,2.049 442 | 04/20/2009,2.059 443 | 04/13/2009,2.051 444 | 04/6/2009,2.037 445 | 03/30/2009,2.046 446 | 03/23/2009,1.962 447 | 03/16/2009,1.91 448 | 03/9/2009,1.941 449 | 03/2/2009,1.934 450 | 02/23/2009,1.909 451 | 02/16/2009,1.964 452 | 02/9/2009,1.926 453 | 02/2/2009,1.892 454 | 01/26/2009,1.838 455 | 01/19/2009,1.847 456 | 01/12/2009,1.784 457 | 01/5/2009,1.684 458 | 12/29/2008,1.613 459 | 12/22/2008,1.653 460 | 12/15/2008,1.659 461 | 12/8/2008,1.699 462 | 12/1/2008,1.811 463 | 11/24/2008,1.892 464 | 11/17/2008,2.072 465 | 11/10/2008,2.224 466 | 11/3/2008,2.4 467 | 10/27/2008,2.656 468 | 10/20/2008,2.914 469 | 10/13/2008,3.151 470 | 10/6/2008,3.484 471 | 09/29/2008,3.632 472 | 09/22/2008,3.718 473 | 09/15/2008,3.835 474 | 09/8/2008,3.648 475 | 09/1/2008,3.68 476 | 08/25/2008,3.685 477 | 08/18/2008,3.74 478 | 08/11/2008,3.809 479 | 08/4/2008,3.88 480 | 07/28/2008,3.955 481 | 07/21/2008,4.064 482 | 07/14/2008,4.113 483 | 07/7/2008,4.114 484 | 06/30/2008,4.095 485 | 06/23/2008,4.079 486 | 06/16/2008,4.082 487 | 06/9/2008,4.039 488 | 06/2/2008,3.976 489 | 05/26/2008,3.937 490 | 05/19/2008,3.791 491 | 05/12/2008,3.722 492 | 05/5/2008,3.613 493 | 04/28/2008,3.603 494 | 04/21/2008,3.508 495 | 04/14/2008,3.389 496 | 04/7/2008,3.332 497 | 03/31/2008,3.29 498 | 03/24/2008,3.259 499 | 03/17/2008,3.284 500 | 03/10/2008,3.225 501 | 03/3/2008,3.162 502 | 02/25/2008,3.13 503 | 02/18/2008,3.042 504 | 02/11/2008,2.96 505 | 02/4/2008,2.978 506 | 01/28/2008,2.977 507 | 01/21/2008,3.017 508 | 01/14/2008,3.068 509 | 01/7/2008,3.109 510 | 12/31/2007,3.053 511 | 12/24/2007,2.98 512 | 12/17/2007,2.998 513 | 12/10/2007,3 514 | 12/3/2007,3.061 515 | 11/26/2007,3.097 516 | 11/19/2007,3.099 517 | 11/12/2007,3.111 518 | 11/5/2007,3.013 519 | 10/29/2007,2.872 520 | 10/22/2007,2.823 521 | 10/15/2007,2.762 522 | 10/8/2007,2.77 523 | 10/1/2007,2.788 524 | 09/24/2007,2.812 525 | 09/17/2007,2.787 526 | 09/10/2007,2.818 527 | 09/3/2007,2.796 528 | 08/27/2007,2.749 529 | 08/20/2007,2.785 530 | 08/13/2007,2.771 531 | 08/6/2007,2.838 532 | 07/30/2007,2.876 533 | 07/23/2007,2.958 534 | 07/16/2007,3.049 535 | 07/9/2007,2.981 536 | 07/2/2007,2.959 537 | 06/25/2007,2.982 538 | 06/18/2007,3.009 539 | 06/11/2007,3.076 540 | 06/4/2007,3.157 541 | 05/28/2007,3.209 542 | 05/21/2007,3.218 543 | 05/14/2007,3.103 544 | 05/7/2007,3.054 545 | 04/30/2007,2.971 546 | 04/23/2007,2.869 547 | 04/16/2007,2.876 548 | 04/9/2007,2.802 549 | 04/2/2007,2.707 550 | 03/26/2007,2.61 551 | 03/19/2007,2.577 552 | 03/12/2007,2.559 553 | 03/5/2007,2.505 554 | 02/26/2007,2.383 555 | 02/19/2007,2.296 556 | 02/12/2007,2.241 557 | 02/5/2007,2.191 558 | 01/29/2007,2.165 559 | 01/22/2007,2.165 560 | 01/15/2007,2.229 561 | 01/8/2007,2.306 562 | 01/1/2007,2.334 563 | -------------------------------------------------------------------------------- /notebooks/data/iris.data: -------------------------------------------------------------------------------- 1 | "sepal.length","sepal.width","petal.length","petal.width","variety" 2 | 5.1,3.5,1.4,.2,"Setosa" 3 | 4.9,3,1.4,.2,"Setosa" 4 | 4.7,3.2,1.3,.2,"Setosa" 5 | 4.6,3.1,1.5,.2,"Setosa" 6 | 5,3.6,1.4,.2,"Setosa" 7 | 5.4,3.9,1.7,.4,"Setosa" 8 | 4.6,3.4,1.4,.3,"Setosa" 9 | 5,3.4,1.5,.2,"Setosa" 10 | 4.4,2.9,1.4,.2,"Setosa" 11 | 4.9,3.1,1.5,.1,"Setosa" 12 | 5.4,3.7,1.5,.2,"Setosa" 13 | 4.8,3.4,1.6,.2,"Setosa" 14 | 4.8,3,1.4,.1,"Setosa" 15 | 4.3,3,1.1,.1,"Setosa" 16 | 5.8,4,1.2,.2,"Setosa" 17 | 5.7,4.4,1.5,.4,"Setosa" 18 | 5.4,3.9,1.3,.4,"Setosa" 19 | 5.1,3.5,1.4,.3,"Setosa" 20 | 5.7,3.8,1.7,.3,"Setosa" 21 | 5.1,3.8,1.5,.3,"Setosa" 22 | 5.4,3.4,1.7,.2,"Setosa" 23 | 5.1,3.7,1.5,.4,"Setosa" 24 | 4.6,3.6,1,.2,"Setosa" 25 | 5.1,3.3,1.7,.5,"Setosa" 26 | 4.8,3.4,1.9,.2,"Setosa" 27 | 5,3,1.6,.2,"Setosa" 28 | 5,3.4,1.6,.4,"Setosa" 29 | 5.2,3.5,1.5,.2,"Setosa" 30 | 5.2,3.4,1.4,.2,"Setosa" 31 | 4.7,3.2,1.6,.2,"Setosa" 32 | 4.8,3.1,1.6,.2,"Setosa" 33 | 5.4,3.4,1.5,.4,"Setosa" 34 | 5.2,4.1,1.5,.1,"Setosa" 35 | 5.5,4.2,1.4,.2,"Setosa" 36 | 4.9,3.1,1.5,.2,"Setosa" 37 | 5,3.2,1.2,.2,"Setosa" 38 | 5.5,3.5,1.3,.2,"Setosa" 39 | 4.9,3.6,1.4,.1,"Setosa" 40 | 4.4,3,1.3,.2,"Setosa" 41 | 5.1,3.4,1.5,.2,"Setosa" 42 | 5,3.5,1.3,.3,"Setosa" 43 | 4.5,2.3,1.3,.3,"Setosa" 44 | 4.4,3.2,1.3,.2,"Setosa" 45 | 5,3.5,1.6,.6,"Setosa" 46 | 5.1,3.8,1.9,.4,"Setosa" 47 | 4.8,3,1.4,.3,"Setosa" 48 | 5.1,3.8,1.6,.2,"Setosa" 49 | 4.6,3.2,1.4,.2,"Setosa" 50 | 5.3,3.7,1.5,.2,"Setosa" 51 | 5,3.3,1.4,.2,"Setosa" 52 | 7,3.2,4.7,1.4,"Versicolor" 53 | 6.4,3.2,4.5,1.5,"Versicolor" 54 | 6.9,3.1,4.9,1.5,"Versicolor" 55 | 5.5,2.3,4,1.3,"Versicolor" 56 | 6.5,2.8,4.6,1.5,"Versicolor" 57 | 5.7,2.8,4.5,1.3,"Versicolor" 58 | 6.3,3.3,4.7,1.6,"Versicolor" 59 | 4.9,2.4,3.3,1,"Versicolor" 60 | 6.6,2.9,4.6,1.3,"Versicolor" 61 | 5.2,2.7,3.9,1.4,"Versicolor" 62 | 5,2,3.5,1,"Versicolor" 63 | 5.9,3,4.2,1.5,"Versicolor" 64 | 6,2.2,4,1,"Versicolor" 65 | 6.1,2.9,4.7,1.4,"Versicolor" 66 | 5.6,2.9,3.6,1.3,"Versicolor" 67 | 6.7,3.1,4.4,1.4,"Versicolor" 68 | 5.6,3,4.5,1.5,"Versicolor" 69 | 5.8,2.7,4.1,1,"Versicolor" 70 | 6.2,2.2,4.5,1.5,"Versicolor" 71 | 5.6,2.5,3.9,1.1,"Versicolor" 72 | 5.9,3.2,4.8,1.8,"Versicolor" 73 | 6.1,2.8,4,1.3,"Versicolor" 74 | 6.3,2.5,4.9,1.5,"Versicolor" 75 | 6.1,2.8,4.7,1.2,"Versicolor" 76 | 6.4,2.9,4.3,1.3,"Versicolor" 77 | 6.6,3,4.4,1.4,"Versicolor" 78 | 6.8,2.8,4.8,1.4,"Versicolor" 79 | 6.7,3,5,1.7,"Versicolor" 80 | 6,2.9,4.5,1.5,"Versicolor" 81 | 5.7,2.6,3.5,1,"Versicolor" 82 | 5.5,2.4,3.8,1.1,"Versicolor" 83 | 5.5,2.4,3.7,1,"Versicolor" 84 | 5.8,2.7,3.9,1.2,"Versicolor" 85 | 6,2.7,5.1,1.6,"Versicolor" 86 | 5.4,3,4.5,1.5,"Versicolor" 87 | 6,3.4,4.5,1.6,"Versicolor" 88 | 6.7,3.1,4.7,1.5,"Versicolor" 89 | 6.3,2.3,4.4,1.3,"Versicolor" 90 | 5.6,3,4.1,1.3,"Versicolor" 91 | 5.5,2.5,4,1.3,"Versicolor" 92 | 5.5,2.6,4.4,1.2,"Versicolor" 93 | 6.1,3,4.6,1.4,"Versicolor" 94 | 5.8,2.6,4,1.2,"Versicolor" 95 | 5,2.3,3.3,1,"Versicolor" 96 | 5.6,2.7,4.2,1.3,"Versicolor" 97 | 5.7,3,4.2,1.2,"Versicolor" 98 | 5.7,2.9,4.2,1.3,"Versicolor" 99 | 6.2,2.9,4.3,1.3,"Versicolor" 100 | 5.1,2.5,3,1.1,"Versicolor" 101 | 5.7,2.8,4.1,1.3,"Versicolor" 102 | 6.3,3.3,6,2.5,"Virginica" 103 | 5.8,2.7,5.1,1.9,"Virginica" 104 | 7.1,3,5.9,2.1,"Virginica" 105 | 6.3,2.9,5.6,1.8,"Virginica" 106 | 6.5,3,5.8,2.2,"Virginica" 107 | 7.6,3,6.6,2.1,"Virginica" 108 | 4.9,2.5,4.5,1.7,"Virginica" 109 | 7.3,2.9,6.3,1.8,"Virginica" 110 | 6.7,2.5,5.8,1.8,"Virginica" 111 | 7.2,3.6,6.1,2.5,"Virginica" 112 | 6.5,3.2,5.1,2,"Virginica" 113 | 6.4,2.7,5.3,1.9,"Virginica" 114 | 6.8,3,5.5,2.1,"Virginica" 115 | 5.7,2.5,5,2,"Virginica" 116 | 5.8,2.8,5.1,2.4,"Virginica" 117 | 6.4,3.2,5.3,2.3,"Virginica" 118 | 6.5,3,5.5,1.8,"Virginica" 119 | 7.7,3.8,6.7,2.2,"Virginica" 120 | 7.7,2.6,6.9,2.3,"Virginica" 121 | 6,2.2,5,1.5,"Virginica" 122 | 6.9,3.2,5.7,2.3,"Virginica" 123 | 5.6,2.8,4.9,2,"Virginica" 124 | 7.7,2.8,6.7,2,"Virginica" 125 | 6.3,2.7,4.9,1.8,"Virginica" 126 | 6.7,3.3,5.7,2.1,"Virginica" 127 | 7.2,3.2,6,1.8,"Virginica" 128 | 6.2,2.8,4.8,1.8,"Virginica" 129 | 6.1,3,4.9,1.8,"Virginica" 130 | 6.4,2.8,5.6,2.1,"Virginica" 131 | 7.2,3,5.8,1.6,"Virginica" 132 | 7.4,2.8,6.1,1.9,"Virginica" 133 | 7.9,3.8,6.4,2,"Virginica" 134 | 6.4,2.8,5.6,2.2,"Virginica" 135 | 6.3,2.8,5.1,1.5,"Virginica" 136 | 6.1,2.6,5.6,1.4,"Virginica" 137 | 7.7,3,6.1,2.3,"Virginica" 138 | 6.3,3.4,5.6,2.4,"Virginica" 139 | 6.4,3.1,5.5,1.8,"Virginica" 140 | 6,3,4.8,1.8,"Virginica" 141 | 6.9,3.1,5.4,2.1,"Virginica" 142 | 6.7,3.1,5.6,2.4,"Virginica" 143 | 6.9,3.1,5.1,2.3,"Virginica" 144 | 5.8,2.7,5.1,1.9,"Virginica" 145 | 6.8,3.2,5.9,2.3,"Virginica" 146 | 6.7,3.3,5.7,2.5,"Virginica" 147 | 6.7,3,5.2,2.3,"Virginica" 148 | 6.3,2.5,5,1.9,"Virginica" 149 | 6.5,3,5.2,2,"Virginica" 150 | 6.2,3.4,5.4,2.3,"Virginica" 151 | 5.9,3,5.1,1.8,"Virginica" -------------------------------------------------------------------------------- /notebooks/data/names.csv: -------------------------------------------------------------------------------- 1 | Name,Age 2 | Cornelia,70 3 | Abbas,69 4 | Penelope,4 5 | Niko,2 6 | -------------------------------------------------------------------------------- /notebooks/data/sensors.csv: -------------------------------------------------------------------------------- 1 | Group,Property,2012,2013,2014,2015,2016 2 | A,Pressure,928,873,814,973,870 3 | A,Temperature,1026,1038,1009,1036,1042 4 | A,Flow,819,806,861,882,856 5 | B,Pressure,817,877,914,806,942 6 | B,Temperature,1008,1041,1009,1002,1013 7 | B,Flow,887,899,837,824,873 8 | -------------------------------------------------------------------------------- /notebooks/data/sql_cheat_sheet.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/notebooks/data/sql_cheat_sheet.jpeg -------------------------------------------------------------------------------- /notebooks/data/stackme.csv: -------------------------------------------------------------------------------- 1 | State,Country,a1,b2,Test,d,e 2 | TX,US,0.45,0.3,Test1,2,6 3 | MA,US,0.03,1.2,Test2,9,7 4 | ON,CAN,0.7,4.2,Test3,4,2 5 | -------------------------------------------------------------------------------- /notebooks/data/state_fruit.csv: -------------------------------------------------------------------------------- 1 | ,Apple,Orange,Banana 2 | Texas,12,10,40 3 | Arizona,9,7,12 4 | Florida,0,14,190 5 | -------------------------------------------------------------------------------- /notebooks/data/state_fruit2.csv: -------------------------------------------------------------------------------- 1 | State,Apple,Orange,Banana 2 | Texas,12,10,40 3 | Arizona,9,7,12 4 | Florida,0,14,190 5 | -------------------------------------------------------------------------------- /notebooks/data/stocks_2016.csv: -------------------------------------------------------------------------------- 1 | Symbol,Shares,Low,High 2 | AAPL,80,95,110 3 | TSLA,50,80,130 4 | WMT,40,55,70 -------------------------------------------------------------------------------- /notebooks/data/stocks_2017.csv: -------------------------------------------------------------------------------- 1 | Symbol,Shares,Low,High 2 | AAPL,50,120,140 3 | GE,100,30,40 4 | IBM,87,75,95 5 | SLB,20,55,85 6 | TXN,500,15,23 7 | TSLA,100,100,300 -------------------------------------------------------------------------------- /notebooks/data/stocks_2018.csv: -------------------------------------------------------------------------------- 1 | Symbol,Shares,Low,High 2 | AAPL,40,135,170 3 | AMZN,8,900,1125 4 | TSLA,50,220,400 5 | -------------------------------------------------------------------------------- /notebooks/data/texas_cities.csv: -------------------------------------------------------------------------------- 1 | City,Geolocation 2 | Houston,"29.7604° N, 95.3698° W" 3 | Dallas,"32.7767° N, 96.7970° W" 4 | Austin,"30.2672° N, 97.7431° W" 5 | -------------------------------------------------------------------------------- /notebooks/data/tips.csv: -------------------------------------------------------------------------------- 1 | "total_bill","tip","sex","smoker","day","time","size" 2 | 16.99,1.01,"Female","No","Sun","Dinner",2 3 | 10.34,1.66,"Male","No","Sun","Dinner",3 4 | 21.01,3.5,"Male","No","Sun","Dinner",3 5 | 23.68,3.31,"Male","No","Sun","Dinner",2 6 | 24.59,3.61,"Female","No","Sun","Dinner",4 7 | 25.29,4.71,"Male","No","Sun","Dinner",4 8 | 8.77,2,"Male","No","Sun","Dinner",2 9 | 26.88,3.12,"Male","No","Sun","Dinner",4 10 | 15.04,1.96,"Male","No","Sun","Dinner",2 11 | 14.78,3.23,"Male","No","Sun","Dinner",2 12 | 10.27,1.71,"Male","No","Sun","Dinner",2 13 | 35.26,5,"Female","No","Sun","Dinner",4 14 | 15.42,1.57,"Male","No","Sun","Dinner",2 15 | 18.43,3,"Male","No","Sun","Dinner",4 16 | 14.83,3.02,"Female","No","Sun","Dinner",2 17 | 21.58,3.92,"Male","No","Sun","Dinner",2 18 | 10.33,1.67,"Female","No","Sun","Dinner",3 19 | 16.29,3.71,"Male","No","Sun","Dinner",3 20 | 16.97,3.5,"Female","No","Sun","Dinner",3 21 | 20.65,3.35,"Male","No","Sat","Dinner",3 22 | 17.92,4.08,"Male","No","Sat","Dinner",2 23 | 20.29,2.75,"Female","No","Sat","Dinner",2 24 | 15.77,2.23,"Female","No","Sat","Dinner",2 25 | 39.42,7.58,"Male","No","Sat","Dinner",4 26 | 19.82,3.18,"Male","No","Sat","Dinner",2 27 | 17.81,2.34,"Male","No","Sat","Dinner",4 28 | 13.37,2,"Male","No","Sat","Dinner",2 29 | 12.69,2,"Male","No","Sat","Dinner",2 30 | 21.7,4.3,"Male","No","Sat","Dinner",2 31 | 19.65,3,"Female","No","Sat","Dinner",2 32 | 9.55,1.45,"Male","No","Sat","Dinner",2 33 | 18.35,2.5,"Male","No","Sat","Dinner",4 34 | 15.06,3,"Female","No","Sat","Dinner",2 35 | 20.69,2.45,"Female","No","Sat","Dinner",4 36 | 17.78,3.27,"Male","No","Sat","Dinner",2 37 | 24.06,3.6,"Male","No","Sat","Dinner",3 38 | 16.31,2,"Male","No","Sat","Dinner",3 39 | 16.93,3.07,"Female","No","Sat","Dinner",3 40 | 18.69,2.31,"Male","No","Sat","Dinner",3 41 | 31.27,5,"Male","No","Sat","Dinner",3 42 | 16.04,2.24,"Male","No","Sat","Dinner",3 43 | 17.46,2.54,"Male","No","Sun","Dinner",2 44 | 13.94,3.06,"Male","No","Sun","Dinner",2 45 | 9.68,1.32,"Male","No","Sun","Dinner",2 46 | 30.4,5.6,"Male","No","Sun","Dinner",4 47 | 18.29,3,"Male","No","Sun","Dinner",2 48 | 22.23,5,"Male","No","Sun","Dinner",2 49 | 32.4,6,"Male","No","Sun","Dinner",4 50 | 28.55,2.05,"Male","No","Sun","Dinner",3 51 | 18.04,3,"Male","No","Sun","Dinner",2 52 | 12.54,2.5,"Male","No","Sun","Dinner",2 53 | 10.29,2.6,"Female","No","Sun","Dinner",2 54 | 34.81,5.2,"Female","No","Sun","Dinner",4 55 | 9.94,1.56,"Male","No","Sun","Dinner",2 56 | 25.56,4.34,"Male","No","Sun","Dinner",4 57 | 19.49,3.51,"Male","No","Sun","Dinner",2 58 | 38.01,3,"Male","Yes","Sat","Dinner",4 59 | 26.41,1.5,"Female","No","Sat","Dinner",2 60 | 11.24,1.76,"Male","Yes","Sat","Dinner",2 61 | 48.27,6.73,"Male","No","Sat","Dinner",4 62 | 20.29,3.21,"Male","Yes","Sat","Dinner",2 63 | 13.81,2,"Male","Yes","Sat","Dinner",2 64 | 11.02,1.98,"Male","Yes","Sat","Dinner",2 65 | 18.29,3.76,"Male","Yes","Sat","Dinner",4 66 | 17.59,2.64,"Male","No","Sat","Dinner",3 67 | 20.08,3.15,"Male","No","Sat","Dinner",3 68 | 16.45,2.47,"Female","No","Sat","Dinner",2 69 | 3.07,1,"Female","Yes","Sat","Dinner",1 70 | 20.23,2.01,"Male","No","Sat","Dinner",2 71 | 15.01,2.09,"Male","Yes","Sat","Dinner",2 72 | 12.02,1.97,"Male","No","Sat","Dinner",2 73 | 17.07,3,"Female","No","Sat","Dinner",3 74 | 26.86,3.14,"Female","Yes","Sat","Dinner",2 75 | 25.28,5,"Female","Yes","Sat","Dinner",2 76 | 14.73,2.2,"Female","No","Sat","Dinner",2 77 | 10.51,1.25,"Male","No","Sat","Dinner",2 78 | 17.92,3.08,"Male","Yes","Sat","Dinner",2 79 | 27.2,4,"Male","No","Thur","Lunch",4 80 | 22.76,3,"Male","No","Thur","Lunch",2 81 | 17.29,2.71,"Male","No","Thur","Lunch",2 82 | 19.44,3,"Male","Yes","Thur","Lunch",2 83 | 16.66,3.4,"Male","No","Thur","Lunch",2 84 | 10.07,1.83,"Female","No","Thur","Lunch",1 85 | 32.68,5,"Male","Yes","Thur","Lunch",2 86 | 15.98,2.03,"Male","No","Thur","Lunch",2 87 | 34.83,5.17,"Female","No","Thur","Lunch",4 88 | 13.03,2,"Male","No","Thur","Lunch",2 89 | 18.28,4,"Male","No","Thur","Lunch",2 90 | 24.71,5.85,"Male","No","Thur","Lunch",2 91 | 21.16,3,"Male","No","Thur","Lunch",2 92 | 28.97,3,"Male","Yes","Fri","Dinner",2 93 | 22.49,3.5,"Male","No","Fri","Dinner",2 94 | 5.75,1,"Female","Yes","Fri","Dinner",2 95 | 16.32,4.3,"Female","Yes","Fri","Dinner",2 96 | 22.75,3.25,"Female","No","Fri","Dinner",2 97 | 40.17,4.73,"Male","Yes","Fri","Dinner",4 98 | 27.28,4,"Male","Yes","Fri","Dinner",2 99 | 12.03,1.5,"Male","Yes","Fri","Dinner",2 100 | 21.01,3,"Male","Yes","Fri","Dinner",2 101 | 12.46,1.5,"Male","No","Fri","Dinner",2 102 | 11.35,2.5,"Female","Yes","Fri","Dinner",2 103 | 15.38,3,"Female","Yes","Fri","Dinner",2 104 | 44.3,2.5,"Female","Yes","Sat","Dinner",3 105 | 22.42,3.48,"Female","Yes","Sat","Dinner",2 106 | 20.92,4.08,"Female","No","Sat","Dinner",2 107 | 15.36,1.64,"Male","Yes","Sat","Dinner",2 108 | 20.49,4.06,"Male","Yes","Sat","Dinner",2 109 | 25.21,4.29,"Male","Yes","Sat","Dinner",2 110 | 18.24,3.76,"Male","No","Sat","Dinner",2 111 | 14.31,4,"Female","Yes","Sat","Dinner",2 112 | 14,3,"Male","No","Sat","Dinner",2 113 | 7.25,1,"Female","No","Sat","Dinner",1 114 | 38.07,4,"Male","No","Sun","Dinner",3 115 | 23.95,2.55,"Male","No","Sun","Dinner",2 116 | 25.71,4,"Female","No","Sun","Dinner",3 117 | 17.31,3.5,"Female","No","Sun","Dinner",2 118 | 29.93,5.07,"Male","No","Sun","Dinner",4 119 | 10.65,1.5,"Female","No","Thur","Lunch",2 120 | 12.43,1.8,"Female","No","Thur","Lunch",2 121 | 24.08,2.92,"Female","No","Thur","Lunch",4 122 | 11.69,2.31,"Male","No","Thur","Lunch",2 123 | 13.42,1.68,"Female","No","Thur","Lunch",2 124 | 14.26,2.5,"Male","No","Thur","Lunch",2 125 | 15.95,2,"Male","No","Thur","Lunch",2 126 | 12.48,2.52,"Female","No","Thur","Lunch",2 127 | 29.8,4.2,"Female","No","Thur","Lunch",6 128 | 8.52,1.48,"Male","No","Thur","Lunch",2 129 | 14.52,2,"Female","No","Thur","Lunch",2 130 | 11.38,2,"Female","No","Thur","Lunch",2 131 | 22.82,2.18,"Male","No","Thur","Lunch",3 132 | 19.08,1.5,"Male","No","Thur","Lunch",2 133 | 20.27,2.83,"Female","No","Thur","Lunch",2 134 | 11.17,1.5,"Female","No","Thur","Lunch",2 135 | 12.26,2,"Female","No","Thur","Lunch",2 136 | 18.26,3.25,"Female","No","Thur","Lunch",2 137 | 8.51,1.25,"Female","No","Thur","Lunch",2 138 | 10.33,2,"Female","No","Thur","Lunch",2 139 | 14.15,2,"Female","No","Thur","Lunch",2 140 | 16,2,"Male","Yes","Thur","Lunch",2 141 | 13.16,2.75,"Female","No","Thur","Lunch",2 142 | 17.47,3.5,"Female","No","Thur","Lunch",2 143 | 34.3,6.7,"Male","No","Thur","Lunch",6 144 | 41.19,5,"Male","No","Thur","Lunch",5 145 | 27.05,5,"Female","No","Thur","Lunch",6 146 | 16.43,2.3,"Female","No","Thur","Lunch",2 147 | 8.35,1.5,"Female","No","Thur","Lunch",2 148 | 18.64,1.36,"Female","No","Thur","Lunch",3 149 | 11.87,1.63,"Female","No","Thur","Lunch",2 150 | 9.78,1.73,"Male","No","Thur","Lunch",2 151 | 7.51,2,"Male","No","Thur","Lunch",2 152 | 14.07,2.5,"Male","No","Sun","Dinner",2 153 | 13.13,2,"Male","No","Sun","Dinner",2 154 | 17.26,2.74,"Male","No","Sun","Dinner",3 155 | 24.55,2,"Male","No","Sun","Dinner",4 156 | 19.77,2,"Male","No","Sun","Dinner",4 157 | 29.85,5.14,"Female","No","Sun","Dinner",5 158 | 48.17,5,"Male","No","Sun","Dinner",6 159 | 25,3.75,"Female","No","Sun","Dinner",4 160 | 13.39,2.61,"Female","No","Sun","Dinner",2 161 | 16.49,2,"Male","No","Sun","Dinner",4 162 | 21.5,3.5,"Male","No","Sun","Dinner",4 163 | 12.66,2.5,"Male","No","Sun","Dinner",2 164 | 16.21,2,"Female","No","Sun","Dinner",3 165 | 13.81,2,"Male","No","Sun","Dinner",2 166 | 17.51,3,"Female","Yes","Sun","Dinner",2 167 | 24.52,3.48,"Male","No","Sun","Dinner",3 168 | 20.76,2.24,"Male","No","Sun","Dinner",2 169 | 31.71,4.5,"Male","No","Sun","Dinner",4 170 | 10.59,1.61,"Female","Yes","Sat","Dinner",2 171 | 10.63,2,"Female","Yes","Sat","Dinner",2 172 | 50.81,10,"Male","Yes","Sat","Dinner",3 173 | 15.81,3.16,"Male","Yes","Sat","Dinner",2 174 | 7.25,5.15,"Male","Yes","Sun","Dinner",2 175 | 31.85,3.18,"Male","Yes","Sun","Dinner",2 176 | 16.82,4,"Male","Yes","Sun","Dinner",2 177 | 32.9,3.11,"Male","Yes","Sun","Dinner",2 178 | 17.89,2,"Male","Yes","Sun","Dinner",2 179 | 14.48,2,"Male","Yes","Sun","Dinner",2 180 | 9.6,4,"Female","Yes","Sun","Dinner",2 181 | 34.63,3.55,"Male","Yes","Sun","Dinner",2 182 | 34.65,3.68,"Male","Yes","Sun","Dinner",4 183 | 23.33,5.65,"Male","Yes","Sun","Dinner",2 184 | 45.35,3.5,"Male","Yes","Sun","Dinner",3 185 | 23.17,6.5,"Male","Yes","Sun","Dinner",4 186 | 40.55,3,"Male","Yes","Sun","Dinner",2 187 | 20.69,5,"Male","No","Sun","Dinner",5 188 | 20.9,3.5,"Female","Yes","Sun","Dinner",3 189 | 30.46,2,"Male","Yes","Sun","Dinner",5 190 | 18.15,3.5,"Female","Yes","Sun","Dinner",3 191 | 23.1,4,"Male","Yes","Sun","Dinner",3 192 | 15.69,1.5,"Male","Yes","Sun","Dinner",2 193 | 19.81,4.19,"Female","Yes","Thur","Lunch",2 194 | 28.44,2.56,"Male","Yes","Thur","Lunch",2 195 | 15.48,2.02,"Male","Yes","Thur","Lunch",2 196 | 16.58,4,"Male","Yes","Thur","Lunch",2 197 | 7.56,1.44,"Male","No","Thur","Lunch",2 198 | 10.34,2,"Male","Yes","Thur","Lunch",2 199 | 43.11,5,"Female","Yes","Thur","Lunch",4 200 | 13,2,"Female","Yes","Thur","Lunch",2 201 | 13.51,2,"Male","Yes","Thur","Lunch",2 202 | 18.71,4,"Male","Yes","Thur","Lunch",3 203 | 12.74,2.01,"Female","Yes","Thur","Lunch",2 204 | 13,2,"Female","Yes","Thur","Lunch",2 205 | 16.4,2.5,"Female","Yes","Thur","Lunch",2 206 | 20.53,4,"Male","Yes","Thur","Lunch",4 207 | 16.47,3.23,"Female","Yes","Thur","Lunch",3 208 | 26.59,3.41,"Male","Yes","Sat","Dinner",3 209 | 38.73,3,"Male","Yes","Sat","Dinner",4 210 | 24.27,2.03,"Male","Yes","Sat","Dinner",2 211 | 12.76,2.23,"Female","Yes","Sat","Dinner",2 212 | 30.06,2,"Male","Yes","Sat","Dinner",3 213 | 25.89,5.16,"Male","Yes","Sat","Dinner",4 214 | 48.33,9,"Male","No","Sat","Dinner",4 215 | 13.27,2.5,"Female","Yes","Sat","Dinner",2 216 | 28.17,6.5,"Female","Yes","Sat","Dinner",3 217 | 12.9,1.1,"Female","Yes","Sat","Dinner",2 218 | 28.15,3,"Male","Yes","Sat","Dinner",5 219 | 11.59,1.5,"Male","Yes","Sat","Dinner",2 220 | 7.74,1.44,"Male","Yes","Sat","Dinner",2 221 | 30.14,3.09,"Female","Yes","Sat","Dinner",4 222 | 12.16,2.2,"Male","Yes","Fri","Lunch",2 223 | 13.42,3.48,"Female","Yes","Fri","Lunch",2 224 | 8.58,1.92,"Male","Yes","Fri","Lunch",1 225 | 15.98,3,"Female","No","Fri","Lunch",3 226 | 13.42,1.58,"Male","Yes","Fri","Lunch",2 227 | 16.27,2.5,"Female","Yes","Fri","Lunch",2 228 | 10.09,2,"Female","Yes","Fri","Lunch",2 229 | 20.45,3,"Male","No","Sat","Dinner",4 230 | 13.28,2.72,"Male","No","Sat","Dinner",2 231 | 22.12,2.88,"Female","Yes","Sat","Dinner",2 232 | 24.01,2,"Male","Yes","Sat","Dinner",4 233 | 15.69,3,"Male","Yes","Sat","Dinner",3 234 | 11.61,3.39,"Male","No","Sat","Dinner",2 235 | 10.77,1.47,"Male","No","Sat","Dinner",2 236 | 15.53,3,"Male","Yes","Sat","Dinner",2 237 | 10.07,1.25,"Male","No","Sat","Dinner",2 238 | 12.6,1,"Male","Yes","Sat","Dinner",2 239 | 32.83,1.17,"Male","Yes","Sat","Dinner",2 240 | 35.83,4.67,"Female","No","Sat","Dinner",3 241 | 29.03,5.92,"Male","No","Sat","Dinner",3 242 | 27.18,2,"Female","Yes","Sat","Dinner",2 243 | 22.67,2,"Male","Yes","Sat","Dinner",2 244 | 17.82,1.75,"Male","No","Sat","Dinner",2 245 | 18.78,3,"Female","No","Thur","Dinner",2 246 | -------------------------------------------------------------------------------- /notebooks/data/weight_loss.csv: -------------------------------------------------------------------------------- 1 | Name,Month,Week,Weight 2 | Bob,Jan,Week 1,291 3 | Amy,Jan,Week 1,197 4 | Bob,Jan,Week 2,288 5 | Amy,Jan,Week 2,189 6 | Bob,Jan,Week 3,283 7 | Amy,Jan,Week 3,189 8 | Bob,Jan,Week 4,283 9 | Amy,Jan,Week 4,190 10 | Bob,Feb,Week 1,283 11 | Amy,Feb,Week 1,190 12 | Bob,Feb,Week 2,275 13 | Amy,Feb,Week 2,184 14 | Bob,Feb,Week 3,268 15 | Amy,Feb,Week 3,177 16 | Bob,Feb,Week 4,268 17 | Amy,Feb,Week 4,173 18 | Bob,Mar,Week 1,268 19 | Amy,Mar,Week 1,173 20 | Bob,Mar,Week 2,271 21 | Amy,Mar,Week 2,173 22 | Bob,Mar,Week 3,265 23 | Amy,Mar,Week 3,170 24 | Bob,Mar,Week 4,261 25 | Amy,Mar,Week 4,170 26 | Bob,Apr,Week 1,261 27 | Amy,Apr,Week 1,170 28 | Bob,Apr,Week 2,258 29 | Amy,Apr,Week 2,164 30 | Bob,Apr,Week 3,253 31 | Amy,Apr,Week 3,164 32 | Bob,Apr,Week 4,250 33 | Amy,Apr,Week 4,161 34 | -------------------------------------------------------------------------------- /notebooks/data/weightlifting_men.csv: -------------------------------------------------------------------------------- 1 | Weight Category,M35 35-39,M40 40-44,M45 45-49,M50 50-54,M55 55-59,M60 60-64,M65 65-69,M70 70-74,M75 75-79,M80 80+ 2 | 56,137,130,125,115,102,92,80,67,62,55 3 | 62,152,145,137,127,112,102,90,75,67,57 4 | 69,167,160,150,140,125,112,97,82,75,60 5 | 77,182,172,165,150,135,122,107,90,82,65 6 | 85,192,182,175,160,142,130,112,95,87,70 7 | 94,202,192,182,167,150,137,120,100,90,75 8 | 105,210,200,190,175,157,142,122,102,95,80 9 | 105+,217,207,197,182,165,150,127,107,100,85 10 | -------------------------------------------------------------------------------- /notebooks/fixed_width.txt: -------------------------------------------------------------------------------- 1 | 2 | Name Age Salary 3 | John 28 50000 4 | Jane 34 60000 5 | Bob 42 55000 6 | Alice 31 65000 7 | -------------------------------------------------------------------------------- /notebooks/no_header.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/notebooks/no_header.xlsx -------------------------------------------------------------------------------- /notebooks/part_006.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "##### Data Manipulation and Types" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "import pandas as pd\n", 17 | "import numpy as np" 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "metadata": {}, 23 | "source": [ 24 | "##### Elementwise Functions\n", 25 | "Apply functions to individual elements" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 2, 31 | "metadata": {}, 32 | "outputs": [ 33 | { 34 | "name": "stdout", 35 | "output_type": "stream", 36 | "text": [ 37 | "Sample DataFrame:\n", 38 | " one two three\n", 39 | "a 1.39 1.77 NaN\n", 40 | "b 0.34 1.91 -0.05\n", 41 | "c 0.69 1.47 1.22\n", 42 | "d NaN 0.27 -0.61\n" 43 | ] 44 | } 45 | ], 46 | "source": [ 47 | "# Create sample DataFrame\n", 48 | "df = pd.DataFrame({\n", 49 | " 'one': [1.39, 0.34, 0.69, np.nan],\n", 50 | " 'two': [1.77, 1.91, 1.47, 0.27],\n", 51 | " 'three': [np.nan, -0.05, 1.22, -0.61]\n", 52 | "}, index=['a', 'b', 'c', 'd'])\n", 53 | "\n", 54 | "print(\"Sample DataFrame:\")\n", 55 | "print(df)" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": 3, 61 | "metadata": {}, 62 | "outputs": [ 63 | { 64 | "name": "stdout", 65 | "output_type": "stream", 66 | "text": [ 67 | "String lengths of 'one' column:\n", 68 | "a 4\n", 69 | "b 4\n", 70 | "c 4\n", 71 | "d 3\n", 72 | "Name: one, dtype: int64\n", 73 | "\n", 74 | "String lengths of all elements:\n", 75 | " one two three\n", 76 | "a 4 4 3\n", 77 | "b 4 4 5\n", 78 | "c 4 4 4\n", 79 | "d 3 4 5\n" 80 | ] 81 | }, 82 | { 83 | "name": "stderr", 84 | "output_type": "stream", 85 | "text": [ 86 | "/var/folders/7y/fzwln1_93mn3js3wyk61_6xm0000gn/T/ipykernel_69237/126587565.py:9: FutureWarning: DataFrame.applymap has been deprecated. Use DataFrame.map instead.\n", 87 | " print(df.applymap(get_str_length))\n" 88 | ] 89 | } 90 | ], 91 | "source": [ 92 | "# Apply custom function to each element\n", 93 | "def get_str_length(x):\n", 94 | " return len(str(x))\n", 95 | "\n", 96 | "print(\"String lengths of 'one' column:\")\n", 97 | "print(df['one'].map(get_str_length))\n", 98 | "\n", 99 | "print(\"\\nString lengths of all elements:\")\n", 100 | "print(df.applymap(get_str_length))" 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": 4, 106 | "metadata": {}, 107 | "outputs": [ 108 | { 109 | "name": "stdout", 110 | "output_type": "stream", 111 | "text": [ 112 | "Original Series:\n", 113 | "a six\n", 114 | "b seven\n", 115 | "c six\n", 116 | "d seven\n", 117 | "e six\n", 118 | "dtype: object\n", 119 | "\n", 120 | "Mapped values:\n", 121 | "a 6.0\n", 122 | "b 7.0\n", 123 | "c 6.0\n", 124 | "d 7.0\n", 125 | "e 6.0\n", 126 | "dtype: float64\n" 127 | ] 128 | } 129 | ], 130 | "source": [ 131 | "# Map values using another Series\n", 132 | "s1 = pd.Series(['six', 'seven', 'six', 'seven', 'six'],\n", 133 | " index=['a', 'b', 'c', 'd', 'e'])\n", 134 | "s2 = pd.Series({'six': 6., 'seven': 7.})\n", 135 | "\n", 136 | "print(\"Original Series:\")\n", 137 | "print(s1)\n", 138 | "print(\"\\nMapped values:\")\n", 139 | "print(s1.map(s2))" 140 | ] 141 | }, 142 | { 143 | "cell_type": "markdown", 144 | "metadata": {}, 145 | "source": [ 146 | "##### Reindexing\n", 147 | "Conform data to match new labels" 148 | ] 149 | }, 150 | { 151 | "cell_type": "code", 152 | "execution_count": 5, 153 | "metadata": {}, 154 | "outputs": [ 155 | { 156 | "name": "stdout", 157 | "output_type": "stream", 158 | "text": [ 159 | "Original Series:\n", 160 | "a 0.293166\n", 161 | "b -0.410848\n", 162 | "c -0.067568\n", 163 | "d 0.320194\n", 164 | "e 0.640690\n", 165 | "dtype: float64\n", 166 | "\n", 167 | "Reindexed Series:\n", 168 | "e 0.640690\n", 169 | "b -0.410848\n", 170 | "f NaN\n", 171 | "d 0.320194\n", 172 | "dtype: float64\n" 173 | ] 174 | } 175 | ], 176 | "source": [ 177 | "# Create sample Series\n", 178 | "s = pd.Series(np.random.randn(5), index=['a', 'b', 'c', 'd', 'e'])\n", 179 | "print(\"Original Series:\")\n", 180 | "print(s)\n", 181 | "\n", 182 | "print(\"\\nReindexed Series:\")\n", 183 | "print(s.reindex(['e', 'b', 'f', 'd']))" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 6, 189 | "metadata": {}, 190 | "outputs": [ 191 | { 192 | "name": "stdout", 193 | "output_type": "stream", 194 | "text": [ 195 | "Original DataFrame:\n", 196 | " one two three\n", 197 | "a 1.39 1.77 NaN\n", 198 | "b 0.34 1.91 -0.05\n", 199 | "c 0.69 1.47 1.22\n", 200 | "d NaN 0.27 -0.61\n", 201 | "\n", 202 | "Reindexed DataFrame:\n", 203 | " three two one\n", 204 | "c 1.22 1.47 0.69\n", 205 | "f NaN NaN NaN\n", 206 | "b -0.05 1.91 0.34\n" 207 | ] 208 | } 209 | ], 210 | "source": [ 211 | "# Reindex DataFrame (both index and columns)\n", 212 | "print(\"Original DataFrame:\")\n", 213 | "print(df)\n", 214 | "\n", 215 | "print(\"\\nReindexed DataFrame:\")\n", 216 | "print(df.reindex(index=['c', 'f', 'b'], columns=['three', 'two', 'one']))" 217 | ] 218 | }, 219 | { 220 | "cell_type": "markdown", 221 | "metadata": {}, 222 | "source": [ 223 | "##### Sorting\n", 224 | "Sort by values or index" 225 | ] 226 | }, 227 | { 228 | "cell_type": "code", 229 | "execution_count": 7, 230 | "metadata": {}, 231 | "outputs": [ 232 | { 233 | "name": "stdout", 234 | "output_type": "stream", 235 | "text": [ 236 | "DataFrame with MultiIndex columns:\n", 237 | " a b\n", 238 | " one two three\n", 239 | "0 2 1 5\n", 240 | "1 1 2 3\n", 241 | "2 1 3 4\n", 242 | "3 1 4 2\n" 243 | ] 244 | } 245 | ], 246 | "source": [ 247 | "# Create sample DataFrame with MultiIndex\n", 248 | "df_multi = pd.DataFrame({\n", 249 | " ('a', 'one'): [2, 1, 1, 1],\n", 250 | " ('a', 'two'): [1, 2, 3, 4],\n", 251 | " ('b', 'three'): [5, 3, 4, 2]\n", 252 | "})\n", 253 | "\n", 254 | "print(\"DataFrame with MultiIndex columns:\")\n", 255 | "print(df_multi)" 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "execution_count": 8, 261 | "metadata": {}, 262 | "outputs": [ 263 | { 264 | "name": "stdout", 265 | "output_type": "stream", 266 | "text": [ 267 | "Sorted by ('a', 'two'):\n", 268 | " a b\n", 269 | " one two three\n", 270 | "0 2 1 5\n", 271 | "1 1 2 3\n", 272 | "2 1 3 4\n", 273 | "3 1 4 2\n" 274 | ] 275 | } 276 | ], 277 | "source": [ 278 | "# Sort by MultiIndex column\n", 279 | "print(\"Sorted by ('a', 'two'):\")\n", 280 | "print(df_multi.sort_values(by=('a', 'two')))" 281 | ] 282 | }, 283 | { 284 | "cell_type": "markdown", 285 | "metadata": {}, 286 | "source": [ 287 | "##### Data Types\n", 288 | "Understanding pandas dtypes" 289 | ] 290 | }, 291 | { 292 | "cell_type": "code", 293 | "execution_count": 9, 294 | "metadata": {}, 295 | "outputs": [ 296 | { 297 | "name": "stdout", 298 | "output_type": "stream", 299 | "text": [ 300 | "DataFrame with different types:\n", 301 | " integers floats strings booleans dates\n", 302 | "0 1 1.1 a True 2025-02-19\n", 303 | "1 2 2.2 b False 2025-02-20\n", 304 | "2 3 3.3 c True 2025-02-21\n", 305 | "\n", 306 | "Data types of each column:\n", 307 | "integers int64\n", 308 | "floats float64\n", 309 | "strings object\n", 310 | "booleans bool\n", 311 | "dates datetime64[ns]\n", 312 | "dtype: object\n" 313 | ] 314 | } 315 | ], 316 | "source": [ 317 | "# Create DataFrame with different types\n", 318 | "df_types = pd.DataFrame({\n", 319 | " 'integers': [1, 2, 3],\n", 320 | " 'floats': [1.1, 2.2, 3.3],\n", 321 | " 'strings': ['a', 'b', 'c'],\n", 322 | " 'booleans': [True, False, True],\n", 323 | " 'dates': pd.date_range('20250219', periods=3)\n", 324 | "})\n", 325 | "\n", 326 | "print(\"DataFrame with different types:\")\n", 327 | "print(df_types)\n", 328 | "print(\"\\nData types of each column:\")\n", 329 | "print(df_types.dtypes)" 330 | ] 331 | }, 332 | { 333 | "cell_type": "code", 334 | "execution_count": 10, 335 | "metadata": {}, 336 | "outputs": [ 337 | { 338 | "name": "stdout", 339 | "output_type": "stream", 340 | "text": [ 341 | "Categorical Series:\n", 342 | "0 a\n", 343 | "1 b\n", 344 | "2 a\n", 345 | "3 c\n", 346 | "dtype: category\n", 347 | "Categories (3, object): ['a', 'b', 'c']\n", 348 | "\n", 349 | "Categories:\n", 350 | "Index(['a', 'b', 'c'], dtype='object')\n" 351 | ] 352 | } 353 | ], 354 | "source": [ 355 | "# Create Series with categorical data\n", 356 | "cat_series = pd.Series(['a', 'b', 'a', 'c'], dtype='category')\n", 357 | "print(\"Categorical Series:\")\n", 358 | "print(cat_series)\n", 359 | "print(\"\\nCategories:\")\n", 360 | "print(cat_series.cat.categories)" 361 | ] 362 | }, 363 | { 364 | "cell_type": "code", 365 | "execution_count": 11, 366 | "metadata": {}, 367 | "outputs": [ 368 | { 369 | "name": "stdout", 370 | "output_type": "stream", 371 | "text": [ 372 | "String Series:\n", 373 | "0 apple\n", 374 | "1 banana\n", 375 | "2 cherry\n", 376 | "dtype: string\n", 377 | "\n", 378 | "Uppercase:\n", 379 | "0 APPLE\n", 380 | "1 BANANA\n", 381 | "2 CHERRY\n", 382 | "dtype: string\n" 383 | ] 384 | } 385 | ], 386 | "source": [ 387 | "# String operations with StringDtype\n", 388 | "str_series = pd.Series(['apple', 'banana', 'cherry'], dtype='string')\n", 389 | "print(\"String Series:\")\n", 390 | "print(str_series)\n", 391 | "print(\"\\nUppercase:\")\n", 392 | "print(str_series.str.upper())" 393 | ] 394 | } 395 | ], 396 | "metadata": { 397 | "kernelspec": { 398 | "display_name": "venv", 399 | "language": "python", 400 | "name": "python3" 401 | }, 402 | "language_info": { 403 | "codemirror_mode": { 404 | "name": "ipython", 405 | "version": 3 406 | }, 407 | "file_extension": ".py", 408 | "mimetype": "text/x-python", 409 | "name": "python", 410 | "nbconvert_exporter": "python", 411 | "pygments_lexer": "ipython3", 412 | "version": "3.13.2" 413 | } 414 | }, 415 | "nbformat": 4, 416 | "nbformat_minor": 4 417 | } 418 | -------------------------------------------------------------------------------- /notebooks/part_008.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "##### Indexing and Data Alignment" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "import pandas as pd\n", 17 | "import numpy as np" 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "metadata": {}, 23 | "source": [ 24 | "##### Basic Indexing Operations\n", 25 | "Different ways to select data" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 2, 31 | "metadata": {}, 32 | "outputs": [ 33 | { 34 | "name": "stdout", 35 | "output_type": "stream", 36 | "text": [ 37 | "Original DataFrame:\n", 38 | " one flag foo\n", 39 | "a NaN NaN bar\n", 40 | "b NaN NaN bar\n", 41 | "c NaN NaN bar\n", 42 | "d NaN NaN bar\n", 43 | "\n", 44 | "Select row by label:\n", 45 | "one NaN\n", 46 | "flag NaN\n", 47 | "foo bar\n", 48 | "Name: b, dtype: object\n", 49 | "\n", 50 | "Select row by integer location:\n", 51 | "one NaN\n", 52 | "flag NaN\n", 53 | "foo bar\n", 54 | "Name: c, dtype: object\n" 55 | ] 56 | } 57 | ], 58 | "source": [ 59 | "# Create sample DataFrame\n", 60 | "df = pd.DataFrame({\n", 61 | " 'one': pd.Series([1., 2., 3., np.nan]),\n", 62 | " 'flag': pd.Series([False, False, True, False]),\n", 63 | " 'foo': 'bar'\n", 64 | "}, index=['a', 'b', 'c', 'd'])\n", 65 | "\n", 66 | "print(\"Original DataFrame:\")\n", 67 | "print(df)\n", 68 | "\n", 69 | "print(\"\\nSelect row by label:\")\n", 70 | "print(df.loc['b'])\n", 71 | "\n", 72 | "print(\"\\nSelect row by integer location:\")\n", 73 | "print(df.iloc[2])" 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "metadata": {}, 79 | "source": [ 80 | "##### Data Alignment\n", 81 | "Automatic alignment of DataFrame objects" 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": 3, 87 | "metadata": {}, 88 | "outputs": [ 89 | { 90 | "name": "stdout", 91 | "output_type": "stream", 92 | "text": [ 93 | "DataFrame 1:\n", 94 | " A B C D\n", 95 | "0 1.567921 -0.600520 0.564308 -0.030036\n", 96 | "1 0.031780 -0.990990 0.851764 -0.024936\n", 97 | "2 0.572579 1.058543 -1.403617 -0.795455\n", 98 | "3 -0.345817 -2.169294 -0.825950 0.853941\n", 99 | "4 1.997710 0.295261 0.083457 1.352197\n", 100 | "\n", 101 | "DataFrame 2:\n", 102 | " A B C\n", 103 | "0 -0.911836 -1.013608 -0.188633\n", 104 | "1 -0.580276 -0.956758 0.777768\n", 105 | "2 -1.958341 -0.972582 0.262211\n", 106 | "3 1.642854 1.383643 0.302067\n", 107 | "4 -0.882981 -0.339678 2.253424\n", 108 | "\n", 109 | "Result of addition (note NaN values):\n", 110 | " A B C D\n", 111 | "0 0.656085 -1.614128 0.375676 NaN\n", 112 | "1 -0.548497 -1.947748 1.629532 NaN\n", 113 | "2 -1.385763 0.085962 -1.141405 NaN\n", 114 | "3 1.297037 -0.785651 -0.523883 NaN\n", 115 | "4 1.114729 -0.044417 2.336881 NaN\n" 116 | ] 117 | } 118 | ], 119 | "source": [ 120 | "# Create two DataFrames with different shapes\n", 121 | "df1 = pd.DataFrame(np.random.randn(10, 4), columns=['A', 'B', 'C', 'D'])\n", 122 | "df2 = pd.DataFrame(np.random.randn(7, 3), columns=['A', 'B', 'C'])\n", 123 | "\n", 124 | "print(\"DataFrame 1:\")\n", 125 | "print(df1.head())\n", 126 | "print(\"\\nDataFrame 2:\")\n", 127 | "print(df2.head())\n", 128 | "\n", 129 | "print(\"\\nResult of addition (note NaN values):\")\n", 130 | "print((df1 + df2).head())" 131 | ] 132 | }, 133 | { 134 | "cell_type": "code", 135 | "execution_count": 4, 136 | "metadata": {}, 137 | "outputs": [ 138 | { 139 | "name": "stdout", 140 | "output_type": "stream", 141 | "text": [ 142 | "Time series DataFrame:\n", 143 | " A B C\n", 144 | "2000-01-01 0.450239 0.703165 0.469230\n", 145 | "2000-01-02 0.745005 -0.548308 0.762866\n", 146 | "2000-01-03 -0.351441 1.086420 0.278941\n", 147 | "2000-01-04 -0.505850 2.643367 0.004853\n", 148 | "2000-01-05 1.643875 0.918085 0.599805\n", 149 | "2000-01-06 -1.199307 0.473668 1.027259\n", 150 | "2000-01-07 0.960449 -0.275233 2.097684\n", 151 | "2000-01-08 -0.708572 -0.974419 0.468220\n", 152 | "\n", 153 | "Subtract column A using proper axis alignment:\n", 154 | " A B C\n", 155 | "2000-01-01 0.0 0.252926 0.018990\n", 156 | "2000-01-02 0.0 -1.293313 0.017861\n", 157 | "2000-01-03 0.0 1.437862 0.630382\n", 158 | "2000-01-04 0.0 3.149217 0.510704\n", 159 | "2000-01-05 0.0 -0.725789 -1.044070\n", 160 | "2000-01-06 0.0 1.672975 2.226566\n", 161 | "2000-01-07 0.0 -1.235682 1.137235\n", 162 | "2000-01-08 0.0 -0.265847 1.176792\n" 163 | ] 164 | } 165 | ], 166 | "source": [ 167 | "# Time series data alignment\n", 168 | "index = pd.date_range('1/1/2000', periods=8)\n", 169 | "df_time = pd.DataFrame(np.random.randn(8, 3), index=index, columns=list('ABC'))\n", 170 | "\n", 171 | "print(\"Time series DataFrame:\")\n", 172 | "print(df_time)\n", 173 | "\n", 174 | "print(\"\\nSubtract column A using proper axis alignment:\")\n", 175 | "print(df_time.sub(df_time['A'], axis=0))" 176 | ] 177 | }, 178 | { 179 | "cell_type": "markdown", 180 | "metadata": {}, 181 | "source": [ 182 | "##### SQL-like Operations\n", 183 | "Filtering and grouping data" 184 | ] 185 | }, 186 | { 187 | "cell_type": "code", 188 | "execution_count": 6, 189 | "metadata": {}, 190 | "outputs": [ 191 | { 192 | "name": "stdout", 193 | "output_type": "stream", 194 | "text": [ 195 | "Tips dataset:\n", 196 | " total_bill tip sex smoker day time size\n", 197 | "0 16.99 1.01 Female No Sun Dinner 2\n", 198 | "1 10.34 1.66 Male No Sun Dinner 3\n", 199 | "2 21.01 3.50 Male No Sun Dinner 3\n", 200 | "3 23.68 3.31 Male No Sun Dinner 2\n", 201 | "4 24.59 3.61 Female No Sun Dinner 4\n" 202 | ] 203 | } 204 | ], 205 | "source": [ 206 | "# Load tips dataset\n", 207 | "tips = pd.read_csv('data/tips.csv')\n", 208 | "print(\"Tips dataset:\")\n", 209 | "print(tips.head())" 210 | ] 211 | }, 212 | { 213 | "cell_type": "code", 214 | "execution_count": 7, 215 | "metadata": {}, 216 | "outputs": [ 217 | { 218 | "name": "stdout", 219 | "output_type": "stream", 220 | "text": [ 221 | "Dinner tips:\n", 222 | " total_bill tip sex smoker day time size\n", 223 | "0 16.99 1.01 Female No Sun Dinner 2\n", 224 | "1 10.34 1.66 Male No Sun Dinner 3\n", 225 | "2 21.01 3.50 Male No Sun Dinner 3\n", 226 | "3 23.68 3.31 Male No Sun Dinner 2\n", 227 | "4 24.59 3.61 Female No Sun Dinner 4\n", 228 | "\n", 229 | "Dinner tips over $5.00:\n", 230 | " total_bill tip sex smoker day time size\n", 231 | "23 39.42 7.58 Male No Sat Dinner 4\n", 232 | "44 30.40 5.60 Male No Sun Dinner 4\n", 233 | "47 32.40 6.00 Male No Sun Dinner 4\n", 234 | "52 34.81 5.20 Female No Sun Dinner 4\n", 235 | "59 48.27 6.73 Male No Sat Dinner 4\n", 236 | "116 29.93 5.07 Male No Sun Dinner 4\n", 237 | "155 29.85 5.14 Female No Sun Dinner 5\n", 238 | "170 50.81 10.00 Male Yes Sat Dinner 3\n", 239 | "172 7.25 5.15 Male Yes Sun Dinner 2\n", 240 | "181 23.33 5.65 Male Yes Sun Dinner 2\n", 241 | "183 23.17 6.50 Male Yes Sun Dinner 4\n", 242 | "211 25.89 5.16 Male Yes Sat Dinner 4\n", 243 | "212 48.33 9.00 Male No Sat Dinner 4\n", 244 | "214 28.17 6.50 Female Yes Sat Dinner 3\n", 245 | "239 29.03 5.92 Male No Sat Dinner 3\n" 246 | ] 247 | } 248 | ], 249 | "source": [ 250 | "# WHERE clause equivalent\n", 251 | "print(\"Dinner tips:\")\n", 252 | "print(tips[tips['time'] == 'Dinner'].head())\n", 253 | "\n", 254 | "print(\"\\nDinner tips over $5.00:\")\n", 255 | "print(tips[(tips['time'] == 'Dinner') & (tips['tip'] > 5.00)])" 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "execution_count": 9, 261 | "metadata": {}, 262 | "outputs": [ 263 | { 264 | "name": "stdout", 265 | "output_type": "stream", 266 | "text": [ 267 | "Original DataFrame:\n", 268 | " col1 col2\n", 269 | "0 A F\n", 270 | "1 B NaN\n", 271 | "2 NaN G\n", 272 | "3 C H\n", 273 | "4 D I\n", 274 | "\n", 275 | "Rows where col2 is NULL:\n", 276 | " col1 col2\n", 277 | "1 B NaN\n", 278 | "\n", 279 | "Rows where col1 is NOT NULL:\n", 280 | " col1 col2\n", 281 | "0 A F\n", 282 | "1 B NaN\n", 283 | "3 C H\n", 284 | "4 D I\n" 285 | ] 286 | } 287 | ], 288 | "source": [ 289 | "# NULL checking\n", 290 | "frame = pd.DataFrame({\n", 291 | " 'col1': ['A', 'B', np.nan, 'C', 'D'],\n", 292 | " 'col2': ['F', np.nan, 'G', 'H', 'I']\n", 293 | "})\n", 294 | "\n", 295 | "print(\"Original DataFrame:\")\n", 296 | "print(frame)\n", 297 | "\n", 298 | "print(\"\\nRows where col2 is NULL:\")\n", 299 | "print(frame[frame['col2'].isna()])\n", 300 | "\n", 301 | "print(\"\\nRows where col1 is NOT NULL:\")\n", 302 | "print(frame[frame['col1'].notna()])" 303 | ] 304 | }, 305 | { 306 | "cell_type": "code", 307 | "execution_count": 10, 308 | "metadata": {}, 309 | "outputs": [ 310 | { 311 | "name": "stdout", 312 | "output_type": "stream", 313 | "text": [ 314 | "Count of tips by sex:\n", 315 | "sex\n", 316 | "Female 87\n", 317 | "Male 157\n", 318 | "dtype: int64\n", 319 | "\n", 320 | "Average tip by sex and time:\n", 321 | "sex time \n", 322 | "Female Dinner 3.002115\n", 323 | " Lunch 2.582857\n", 324 | "Male Dinner 3.144839\n", 325 | " Lunch 2.882121\n", 326 | "Name: tip, dtype: float64\n" 327 | ] 328 | } 329 | ], 330 | "source": [ 331 | "# GROUP BY operations\n", 332 | "print(\"Count of tips by sex:\")\n", 333 | "print(tips.groupby('sex').size())\n", 334 | "\n", 335 | "print(\"\\nAverage tip by sex and time:\")\n", 336 | "print(tips.groupby(['sex', 'time'])['tip'].mean())" 337 | ] 338 | }, 339 | { 340 | "cell_type": "code", 341 | "execution_count": null, 342 | "metadata": {}, 343 | "outputs": [], 344 | "source": [] 345 | } 346 | ], 347 | "metadata": { 348 | "kernelspec": { 349 | "display_name": "venv", 350 | "language": "python", 351 | "name": "python3" 352 | }, 353 | "language_info": { 354 | "codemirror_mode": { 355 | "name": "ipython", 356 | "version": 3 357 | }, 358 | "file_extension": ".py", 359 | "mimetype": "text/x-python", 360 | "name": "python", 361 | "nbconvert_exporter": "python", 362 | "pygments_lexer": "ipython3", 363 | "version": "3.13.2" 364 | } 365 | }, 366 | "nbformat": 4, 367 | "nbformat_minor": 4 368 | } 369 | -------------------------------------------------------------------------------- /notebooks/part_009.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "##### SQL-like Operations and Data I/O" 8 | ] 9 | }, 10 | { 11 | "cell_type": "code", 12 | "execution_count": 1, 13 | "metadata": {}, 14 | "outputs": [], 15 | "source": [ 16 | "import pandas as pd\n", 17 | "import numpy as np" 18 | ] 19 | }, 20 | { 21 | "cell_type": "markdown", 22 | "metadata": {}, 23 | "source": [ 24 | "##### Advanced GROUP BY Operations\n", 25 | "Multiple aggregations and complex grouping" 26 | ] 27 | }, 28 | { 29 | "cell_type": "code", 30 | "execution_count": 2, 31 | "metadata": {}, 32 | "outputs": [ 33 | { 34 | "name": "stdout", 35 | "output_type": "stream", 36 | "text": [ 37 | "Tips summary by day:\n", 38 | " tip total_bill \n", 39 | " mean size sum mean\n", 40 | "day \n", 41 | "Fri 2.734737 19 325.88 17.151579\n", 42 | "Sat 2.993103 87 1778.40 20.441379\n", 43 | "Sun 3.255132 76 1627.16 21.410000\n", 44 | "Thur 2.771452 62 1096.33 17.682742\n" 45 | ] 46 | }, 47 | { 48 | "name": "stderr", 49 | "output_type": "stream", 50 | "text": [ 51 | "/var/folders/7y/fzwln1_93mn3js3wyk61_6xm0000gn/T/ipykernel_71595/2855229918.py:6: FutureWarning: The provided callable is currently using SeriesGroupBy.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"mean\" instead.\n", 52 | " print(tips.groupby('day').agg({\n", 53 | "/var/folders/7y/fzwln1_93mn3js3wyk61_6xm0000gn/T/ipykernel_71595/2855229918.py:6: FutureWarning: The provided callable is currently using SeriesGroupBy.sum. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"sum\" instead.\n", 54 | " print(tips.groupby('day').agg({\n", 55 | "/var/folders/7y/fzwln1_93mn3js3wyk61_6xm0000gn/T/ipykernel_71595/2855229918.py:6: FutureWarning: The provided callable is currently using SeriesGroupBy.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"mean\" instead.\n", 56 | " print(tips.groupby('day').agg({\n" 57 | ] 58 | } 59 | ], 60 | "source": [ 61 | "# Load tips dataset\n", 62 | "tips = pd.read_csv('data/tips.csv')\n", 63 | "\n", 64 | "# Multiple aggregations\n", 65 | "print(\"Tips summary by day:\")\n", 66 | "print(tips.groupby('day').agg({\n", 67 | " 'tip': [np.mean, np.size],\n", 68 | " 'total_bill': [np.sum, np.mean]\n", 69 | "}))" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": 3, 75 | "metadata": {}, 76 | "outputs": [ 77 | { 78 | "name": "stdout", 79 | "output_type": "stream", 80 | "text": [ 81 | "Tips summary by smoker and day:\n", 82 | " tip \n", 83 | " size mean\n", 84 | "smoker day \n", 85 | "No Fri 4 2.812500\n", 86 | " Sat 45 3.102889\n", 87 | " Sun 57 3.167895\n", 88 | " Thur 45 2.673778\n", 89 | "Yes Fri 15 2.714000\n", 90 | " Sat 42 2.875476\n", 91 | " Sun 19 3.516842\n", 92 | " Thur 17 3.030000\n" 93 | ] 94 | }, 95 | { 96 | "name": "stderr", 97 | "output_type": "stream", 98 | "text": [ 99 | "/var/folders/7y/fzwln1_93mn3js3wyk61_6xm0000gn/T/ipykernel_71595/1901242416.py:3: FutureWarning: The provided callable is currently using SeriesGroupBy.mean. In a future version of pandas, the provided callable will be used directly. To keep current behavior pass the string \"mean\" instead.\n", 100 | " print(tips.groupby(['smoker', 'day']).agg({\n" 101 | ] 102 | } 103 | ], 104 | "source": [ 105 | "# Group by multiple columns\n", 106 | "print(\"Tips summary by smoker and day:\")\n", 107 | "print(tips.groupby(['smoker', 'day']).agg({\n", 108 | " 'tip': [np.size, np.mean]\n", 109 | "}))" 110 | ] 111 | }, 112 | { 113 | "cell_type": "markdown", 114 | "metadata": {}, 115 | "source": [ 116 | "##### JOIN Operations\n", 117 | "Different types of joins in pandas" 118 | ] 119 | }, 120 | { 121 | "cell_type": "code", 122 | "execution_count": 4, 123 | "metadata": {}, 124 | "outputs": [ 125 | { 126 | "name": "stdout", 127 | "output_type": "stream", 128 | "text": [ 129 | "DataFrame 1:\n", 130 | " key value\n", 131 | "0 A 0.886876\n", 132 | "1 B 0.585386\n", 133 | "2 C 1.022575\n", 134 | "3 D 0.006838\n", 135 | "\n", 136 | "DataFrame 2:\n", 137 | " key value\n", 138 | "0 B 0.993532\n", 139 | "1 D 1.063438\n", 140 | "2 D -0.860047\n", 141 | "3 E -0.204878\n" 142 | ] 143 | } 144 | ], 145 | "source": [ 146 | "# Create sample DataFrames\n", 147 | "df1 = pd.DataFrame({\n", 148 | " 'key': ['A', 'B', 'C', 'D'],\n", 149 | " 'value': np.random.randn(4)\n", 150 | "})\n", 151 | "\n", 152 | "df2 = pd.DataFrame({\n", 153 | " 'key': ['B', 'D', 'D', 'E'],\n", 154 | " 'value': np.random.randn(4)\n", 155 | "})\n", 156 | "\n", 157 | "print(\"DataFrame 1:\")\n", 158 | "print(df1)\n", 159 | "print(\"\\nDataFrame 2:\")\n", 160 | "print(df2)" 161 | ] 162 | }, 163 | { 164 | "cell_type": "code", 165 | "execution_count": 5, 166 | "metadata": {}, 167 | "outputs": [ 168 | { 169 | "name": "stdout", 170 | "output_type": "stream", 171 | "text": [ 172 | "Inner join:\n", 173 | " key value_x value_y\n", 174 | "0 B 0.585386 0.993532\n", 175 | "1 D 0.006838 1.063438\n", 176 | "2 D 0.006838 -0.860047\n", 177 | "\n", 178 | "Left join:\n", 179 | " key value_x value_y\n", 180 | "0 A 0.886876 NaN\n", 181 | "1 B 0.585386 0.993532\n", 182 | "2 C 1.022575 NaN\n", 183 | "3 D 0.006838 1.063438\n", 184 | "4 D 0.006838 -0.860047\n", 185 | "\n", 186 | "Right join:\n", 187 | " key value_x value_y\n", 188 | "0 B 0.585386 0.993532\n", 189 | "1 D 0.006838 1.063438\n", 190 | "2 D 0.006838 -0.860047\n", 191 | "3 E NaN -0.204878\n" 192 | ] 193 | } 194 | ], 195 | "source": [ 196 | "# Inner join\n", 197 | "print(\"Inner join:\")\n", 198 | "print(pd.merge(df1, df2, on='key'))\n", 199 | "\n", 200 | "# Left join\n", 201 | "print(\"\\nLeft join:\")\n", 202 | "print(pd.merge(df1, df2, on='key', how='left'))\n", 203 | "\n", 204 | "# Right join\n", 205 | "print(\"\\nRight join:\")\n", 206 | "print(pd.merge(df1, df2, on='key', how='right'))" 207 | ] 208 | }, 209 | { 210 | "cell_type": "code", 211 | "execution_count": 6, 212 | "metadata": {}, 213 | "outputs": [ 214 | { 215 | "name": "stdout", 216 | "output_type": "stream", 217 | "text": [ 218 | "Join DataFrame with indexed DataFrame:\n", 219 | " key value_x value_y\n", 220 | "1 B 0.585386 0.993532\n", 221 | "3 D 0.006838 1.063438\n", 222 | "3 D 0.006838 -0.860047\n" 223 | ] 224 | } 225 | ], 226 | "source": [ 227 | "# Join with index\n", 228 | "indexed_df2 = df2.set_index('key')\n", 229 | "print(\"Join DataFrame with indexed DataFrame:\")\n", 230 | "print(pd.merge(df1, indexed_df2, left_on='key', right_index=True))" 231 | ] 232 | }, 233 | { 234 | "cell_type": "markdown", 235 | "metadata": {}, 236 | "source": [ 237 | "##### Data Input/Output\n", 238 | "Reading and writing data in different formats" 239 | ] 240 | }, 241 | { 242 | "cell_type": "code", 243 | "execution_count": 7, 244 | "metadata": {}, 245 | "outputs": [ 246 | { 247 | "name": "stdout", 248 | "output_type": "stream", 249 | "text": [ 250 | "DataFrame from dictionary:\n", 251 | " x y\n", 252 | "0 1 2\n", 253 | "1 3 4\n", 254 | "2 5 6\n" 255 | ] 256 | } 257 | ], 258 | "source": [ 259 | "# Create DataFrame from values\n", 260 | "df = pd.DataFrame({\n", 261 | " 'x': [1, 3, 5],\n", 262 | " 'y': [2, 4, 6]\n", 263 | "})\n", 264 | "\n", 265 | "print(\"DataFrame from dictionary:\")\n", 266 | "print(df)" 267 | ] 268 | }, 269 | { 270 | "cell_type": "code", 271 | "execution_count": 8, 272 | "metadata": {}, 273 | "outputs": [ 274 | { 275 | "name": "stdout", 276 | "output_type": "stream", 277 | "text": [ 278 | "\n", 279 | "DataFrame read from CSV:\n", 280 | " x y\n", 281 | "0 1 2\n", 282 | "1 3 4\n", 283 | "2 5 6\n" 284 | ] 285 | } 286 | ], 287 | "source": [ 288 | "# Write DataFrame to CSV\n", 289 | "df.to_csv('sample.csv', index=False)\n", 290 | "\n", 291 | "# Read CSV file\n", 292 | "df_read = pd.read_csv('sample.csv')\n", 293 | "print(\"\\nDataFrame read from CSV:\")\n", 294 | "print(df_read)" 295 | ] 296 | }, 297 | { 298 | "cell_type": "markdown", 299 | "metadata": {}, 300 | "source": [ 301 | "##### Column Operations\n", 302 | "Manipulating columns in pandas" 303 | ] 304 | }, 305 | { 306 | "cell_type": "code", 307 | "execution_count": 9, 308 | "metadata": {}, 309 | "outputs": [ 310 | { 311 | "name": "stdout", 312 | "output_type": "stream", 313 | "text": [ 314 | "Original tips data:\n", 315 | " total_bill tip sex smoker day time size\n", 316 | "0 16.99 1.01 Female No Sun Dinner 2\n", 317 | "1 10.34 1.66 Male No Sun Dinner 3\n", 318 | "2 21.01 3.50 Male No Sun Dinner 3\n", 319 | "3 23.68 3.31 Male No Sun Dinner 2\n", 320 | "4 24.59 3.61 Female No Sun Dinner 4\n", 321 | "\n", 322 | "Modified tips data:\n", 323 | " total_bill tip sex smoker day time size new_bill\n", 324 | "0 14.99 1.01 Female No Sun Dinner 2 7.495\n", 325 | "1 8.34 1.66 Male No Sun Dinner 3 4.170\n", 326 | "2 19.01 3.50 Male No Sun Dinner 3 9.505\n", 327 | "3 21.68 3.31 Male No Sun Dinner 2 10.840\n", 328 | "4 22.59 3.61 Female No Sun Dinner 4 11.295\n", 329 | "\n", 330 | "After dropping new_bill:\n", 331 | " total_bill tip sex smoker day time size\n", 332 | "0 14.99 1.01 Female No Sun Dinner 2\n", 333 | "1 8.34 1.66 Male No Sun Dinner 3\n", 334 | "2 19.01 3.50 Male No Sun Dinner 3\n", 335 | "3 21.68 3.31 Male No Sun Dinner 2\n", 336 | "4 22.59 3.61 Female No Sun Dinner 4\n" 337 | ] 338 | } 339 | ], 340 | "source": [ 341 | "# Load tips data\n", 342 | "print(\"Original tips data:\")\n", 343 | "print(tips.head())\n", 344 | "\n", 345 | "# Modify existing column\n", 346 | "tips['total_bill'] = tips['total_bill'] - 2\n", 347 | "\n", 348 | "# Create new column\n", 349 | "tips['new_bill'] = tips['total_bill'] / 2\n", 350 | "\n", 351 | "print(\"\\nModified tips data:\")\n", 352 | "print(tips.head())\n", 353 | "\n", 354 | "# Drop column\n", 355 | "tips = tips.drop('new_bill', axis=1)\n", 356 | "\n", 357 | "print(\"\\nAfter dropping new_bill:\")\n", 358 | "print(tips.head())" 359 | ] 360 | } 361 | ], 362 | "metadata": { 363 | "kernelspec": { 364 | "display_name": "venv", 365 | "language": "python", 366 | "name": "python3" 367 | }, 368 | "language_info": { 369 | "codemirror_mode": { 370 | "name": "ipython", 371 | "version": 3 372 | }, 373 | "file_extension": ".py", 374 | "mimetype": "text/x-python", 375 | "name": "python", 376 | "nbconvert_exporter": "python", 377 | "pygments_lexer": "ipython3", 378 | "version": "3.13.2" 379 | } 380 | }, 381 | "nbformat": 4, 382 | "nbformat_minor": 4 383 | } 384 | -------------------------------------------------------------------------------- /notebooks/part_094.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "#### Pandas Functions and Commands - Part 94\n", 8 | "\n", 9 | "This notebook documents pandas extension API and development information." 10 | ] 11 | }, 12 | { 13 | "cell_type": "markdown", 14 | "metadata": {}, 15 | "source": [ 16 | "##### ExtensionDtype Attributes and Methods\n", 17 | "\n", 18 | "The `ExtensionDtype` class provides a framework for creating custom data types in pandas. Here are its key attributes and methods:" 19 | ] 20 | }, 21 | { 22 | "cell_type": "code", 23 | "execution_count": 1, 24 | "metadata": {}, 25 | "outputs": [], 26 | "source": [ 27 | "import pandas as pd\n", 28 | "import numpy as np\n", 29 | "from pandas.api.extensions import ExtensionDtype, ExtensionArray" 30 | ] 31 | }, 32 | { 33 | "cell_type": "markdown", 34 | "metadata": {}, 35 | "source": [ 36 | "### Attributes of ExtensionDtype\n", 37 | "\n", 38 | "- **kind**: A character code (one of 'biufcmMOSUV'), default 'O'. This should match the NumPy dtype when the array is converted to ndarray.\n", 39 | "- **na_value**: Default NA value to use for this type. This is the user-facing \"boxed\" version of the NA value.\n", 40 | "- **name**: A string identifying the data type. Used for display in Series.dtype.\n", 41 | "- **names**: Ordered list of field names, or None if there are no fields. For compatibility with NumPy arrays.\n", 42 | "- **type**: The scalar type for the array. ExtensionArray[item] should return an instance of this type for scalar items." 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "metadata": {}, 48 | "source": [ 49 | "### Methods of ExtensionDtype\n", 50 | "\n", 51 | "- **construct_array_type()**: Return the array type associated with this dtype.\n", 52 | "- **construct_from_string(string)**: Construct this type from a string.\n", 53 | "- **is_dtype(dtype)**: Check if we match 'dtype'." 54 | ] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "metadata": {}, 59 | "source": [ 60 | "### Example of a Custom ExtensionDtype" 61 | ] 62 | }, 63 | { 64 | "cell_type": "code", 65 | "execution_count": 2, 66 | "metadata": {}, 67 | "outputs": [ 68 | { 69 | "name": "stdout", 70 | "output_type": "stream", 71 | "text": [ 72 | "Name: money\n", 73 | "Currency: EUR\n", 74 | "Kind: O\n", 75 | "Type: \n", 76 | "NA value: None\n" 77 | ] 78 | } 79 | ], 80 | "source": [ 81 | "# Example of a simple custom ExtensionDtype for money values\n", 82 | "class MoneyDtype(ExtensionDtype):\n", 83 | " name = 'money'\n", 84 | " kind = 'O'\n", 85 | " type = object\n", 86 | " na_value = None\n", 87 | " \n", 88 | " def __init__(self, currency='USD'):\n", 89 | " self.currency = currency\n", 90 | " self._metadata = ('currency',)\n", 91 | " \n", 92 | " @classmethod\n", 93 | " def construct_from_string(cls, string):\n", 94 | " if string == cls.name:\n", 95 | " return cls()\n", 96 | " elif string.startswith(cls.name):\n", 97 | " # Parse 'money[EUR]' format\n", 98 | " if string.endswith(']') and '[' in string:\n", 99 | " currency = string[string.find('[')+1:string.find(']')]\n", 100 | " return cls(currency=currency)\n", 101 | " raise TypeError(f\"Cannot construct {cls.name} from {string}\")\n", 102 | " \n", 103 | " @classmethod\n", 104 | " def construct_array_type(cls):\n", 105 | " # This would normally return the associated ExtensionArray class\n", 106 | " return MoneyArray\n", 107 | "\n", 108 | "# This is a simplified example and would need more implementation\n", 109 | "# to be fully functional as an ExtensionArray\n", 110 | "class MoneyArray(ExtensionArray):\n", 111 | " pass\n", 112 | "\n", 113 | "# Create and display information about our custom dtype\n", 114 | "money_dtype = MoneyDtype(currency='EUR')\n", 115 | "print(f\"Name: {money_dtype.name}\")\n", 116 | "print(f\"Currency: {money_dtype.currency}\")\n", 117 | "print(f\"Kind: {money_dtype.kind}\")\n", 118 | "print(f\"Type: {money_dtype.type}\")\n", 119 | "print(f\"NA value: {money_dtype.na_value}\")" 120 | ] 121 | }, 122 | { 123 | "cell_type": "markdown", 124 | "metadata": {}, 125 | "source": [ 126 | "##### Pandas Development Environment Setup\n", 127 | "\n", 128 | "This section provides instructions for setting up a pandas development environment. This is useful if you want to contribute to pandas or build pandas from source." 129 | ] 130 | }, 131 | { 132 | "cell_type": "markdown", 133 | "metadata": {}, 134 | "source": [ 135 | "### Prerequisites\n", 136 | "\n", 137 | "For building pandas from source, you need:\n", 138 | "\n", 139 | "1. A C compiler\n", 140 | "2. Python environment (3.6.1 or higher)\n", 141 | "\n", 142 | "#### Installing a C Compiler\n", 143 | "\n", 144 | "**For Debian/Ubuntu:**\n", 145 | "```bash\n", 146 | "sudo apt install build-essential\n", 147 | "```\n", 148 | "\n", 149 | "**For Red Hat/RHEL/CentOS/Fedora:**\n", 150 | "```bash\n", 151 | "yum groupinstall \"Development Tools\"\n", 152 | "```" 153 | ] 154 | }, 155 | { 156 | "cell_type": "markdown", 157 | "metadata": {}, 158 | "source": [ 159 | "### Setting up with Conda\n", 160 | "\n", 161 | "```bash\n", 162 | "# Create and activate the build environment\n", 163 | "conda env create -f environment.yml\n", 164 | "conda activate pandas-dev\n", 165 | "\n", 166 | "# Build and install pandas\n", 167 | "python setup.py build_ext --inplace -j 4\n", 168 | "python -m pip install -e . --no-build-isolation --no-use-pep517\n", 169 | "```\n", 170 | "\n", 171 | "To verify the installation:\n", 172 | "```python\n", 173 | "import pandas\n", 174 | "print(pandas.__version__)\n", 175 | "```\n", 176 | "\n", 177 | "Conda environment management:\n", 178 | "```bash\n", 179 | "# View environments\n", 180 | "conda info -e\n", 181 | "\n", 182 | "# Return to root environment\n", 183 | "conda deactivate\n", 184 | "```" 185 | ] 186 | }, 187 | { 188 | "cell_type": "markdown", 189 | "metadata": {}, 190 | "source": [ 191 | "### Setting up with pip (Unix/Mac OS)\n", 192 | "\n", 193 | "```bash\n", 194 | "# Create a virtual environment\n", 195 | "python3 -m venv ~/virtualenvs/pandas-dev\n", 196 | "\n", 197 | "# Activate the virtualenv\n", 198 | ". ~/virtualenvs/pandas-dev/bin/activate\n", 199 | "\n", 200 | "# Install the build dependencies\n", 201 | "python -m pip install -r requirements-dev.txt\n", 202 | "\n", 203 | "# Build and install pandas\n", 204 | "python setup.py build_ext --inplace -j 0\n", 205 | "python -m pip install -e . --no-build-isolation --no-use-pep517\n", 206 | "```" 207 | ] 208 | }, 209 | { 210 | "cell_type": "markdown", 211 | "metadata": {}, 212 | "source": [ 213 | "### Setting up with pip (Windows)\n", 214 | "\n", 215 | "```powershell\n", 216 | "# Create a virtual environment\n", 217 | "python -m venv $env:USERPROFILE\\virtualenvs\\pandas-dev\n", 218 | "\n", 219 | "# Activate the virtualenv\n", 220 | "~\\virtualenvs\\pandas-dev\\Scripts\\Activate.ps1\n", 221 | "\n", 222 | "# Install the build dependencies\n", 223 | "python -m pip install -r requirements-dev.txt\n", 224 | "\n", 225 | "# Build and install pandas\n", 226 | "python setup.py build_ext --inplace -j 0\n", 227 | "python -m pip install -e . --no-build-isolation --no-use-pep517\n", 228 | "```" 229 | ] 230 | }, 231 | { 232 | "cell_type": "markdown", 233 | "metadata": {}, 234 | "source": [ 235 | "### Git Workflow for Contributing\n", 236 | "\n", 237 | "When contributing to pandas, it's recommended to create a feature branch for your changes:\n", 238 | "\n", 239 | "```bash\n", 240 | "# Create and switch to a new branch\n", 241 | "git branch shiny-new-feature\n", 242 | "git checkout shiny-new-feature\n", 243 | "\n", 244 | "# Or in one command\n", 245 | "git checkout -b shiny-new-feature\n", 246 | "```" 247 | ] 248 | }, 249 | { 250 | "cell_type": "markdown", 251 | "metadata": {}, 252 | "source": [ 253 | "##### Practical Example: Using ExtensionDtype\n", 254 | "\n", 255 | "Let's see how we might use a custom dtype in a practical scenario:" 256 | ] 257 | }, 258 | { 259 | "cell_type": "code", 260 | "execution_count": 3, 261 | "metadata": {}, 262 | "outputs": [ 263 | { 264 | "data": { 265 | "text/plain": [ 266 | "\"\\nmoney_values = MoneyArray([10.50, 20.75, 30.00], dtype=MoneyDtype(currency='USD'))\\ns = pd.Series(money_values)\\n\\n# The Series would display with currency information\\nprint(s)\\n# 0 $10.50\\n# 1 $20.75\\n# 2 $30.00\\n# dtype: money[USD]\\n\\n# And operations would respect the currency\\nprint(s * 2)\\n# 0 $21.00\\n# 1 $41.50\\n# 2 $60.00\\n# dtype: money[USD]\\n\"" 267 | ] 268 | }, 269 | "execution_count": 3, 270 | "metadata": {}, 271 | "output_type": "execute_result" 272 | } 273 | ], 274 | "source": [ 275 | "# This is a simplified example showing how a custom dtype might be used\n", 276 | "# Note: This won't actually run without a full implementation of MoneyArray\n", 277 | "\n", 278 | "# Imagine we have a fully implemented MoneyArray class\n", 279 | "# We could create a Series with money values\n", 280 | "\n", 281 | "# Conceptual example (won't run):\n", 282 | "'''\n", 283 | "money_values = MoneyArray([10.50, 20.75, 30.00], dtype=MoneyDtype(currency='USD'))\n", 284 | "s = pd.Series(money_values)\n", 285 | "\n", 286 | "# The Series would display with currency information\n", 287 | "print(s)\n", 288 | "# 0 $10.50\n", 289 | "# 1 $20.75\n", 290 | "# 2 $30.00\n", 291 | "# dtype: money[USD]\n", 292 | "\n", 293 | "# And operations would respect the currency\n", 294 | "print(s * 2)\n", 295 | "# 0 $21.00\n", 296 | "# 1 $41.50\n", 297 | "# 2 $60.00\n", 298 | "# dtype: money[USD]\n", 299 | "'''" 300 | ] 301 | }, 302 | { 303 | "cell_type": "markdown", 304 | "metadata": {}, 305 | "source": [ 306 | "##### Using Existing Extension Arrays\n", 307 | "\n", 308 | "While creating custom extension arrays is advanced, pandas comes with several built-in extension arrays that you can use:" 309 | ] 310 | }, 311 | { 312 | "cell_type": "code", 313 | "execution_count": 4, 314 | "metadata": {}, 315 | "outputs": [ 316 | { 317 | "name": "stdout", 318 | "output_type": "stream", 319 | "text": [ 320 | "Categorical Series:\n", 321 | "0 a\n", 322 | "1 b\n", 323 | "2 a\n", 324 | "3 c\n", 325 | "dtype: category\n", 326 | "Categories (4, object): ['a', 'b', 'c', 'd']\n", 327 | "dtype: category\n", 328 | "\n", 329 | "Integer Series with NA:\n", 330 | "0 1\n", 331 | "1 2\n", 332 | "2 \n", 333 | "3 4\n", 334 | "dtype: Int64\n", 335 | "dtype: Int64\n", 336 | "\n", 337 | "Boolean Series with NA:\n", 338 | "0 True\n", 339 | "1 False\n", 340 | "2 \n", 341 | "3 True\n", 342 | "dtype: boolean\n", 343 | "dtype: boolean\n", 344 | "\n", 345 | "String Series:\n", 346 | "0 a\n", 347 | "1 b\n", 348 | "2 \n", 349 | "3 d\n", 350 | "dtype: string\n", 351 | "dtype: string\n" 352 | ] 353 | } 354 | ], 355 | "source": [ 356 | "# Categorical data\n", 357 | "cat = pd.Categorical(['a', 'b', 'a', 'c'], categories=['a', 'b', 'c', 'd'])\n", 358 | "s_cat = pd.Series(cat)\n", 359 | "print(\"Categorical Series:\")\n", 360 | "print(s_cat)\n", 361 | "print(f\"dtype: {s_cat.dtype}\\n\")\n", 362 | "\n", 363 | "# Integer with NA support\n", 364 | "s_int = pd.Series([1, 2, None, 4], dtype=\"Int64\")\n", 365 | "print(\"Integer Series with NA:\")\n", 366 | "print(s_int)\n", 367 | "print(f\"dtype: {s_int.dtype}\\n\")\n", 368 | "\n", 369 | "# Boolean with NA support\n", 370 | "s_bool = pd.Series([True, False, None, True], dtype=\"boolean\")\n", 371 | "print(\"Boolean Series with NA:\")\n", 372 | "print(s_bool)\n", 373 | "print(f\"dtype: {s_bool.dtype}\\n\")\n", 374 | "\n", 375 | "# String data\n", 376 | "s_str = pd.Series(['a', 'b', None, 'd'], dtype=\"string\")\n", 377 | "print(\"String Series:\")\n", 378 | "print(s_str)\n", 379 | "print(f\"dtype: {s_str.dtype}\")" 380 | ] 381 | } 382 | ], 383 | "metadata": { 384 | "kernelspec": { 385 | "display_name": "venv", 386 | "language": "python", 387 | "name": "python3" 388 | }, 389 | "language_info": { 390 | "codemirror_mode": { 391 | "name": "ipython", 392 | "version": 3 393 | }, 394 | "file_extension": ".py", 395 | "mimetype": "text/x-python", 396 | "name": "python", 397 | "nbconvert_exporter": "python", 398 | "pygments_lexer": "ipython3", 399 | "version": "3.13.2" 400 | } 401 | }, 402 | "nbformat": 4, 403 | "nbformat_minor": 4 404 | } 405 | -------------------------------------------------------------------------------- /notebooks/part_095.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "#### Pandas Development and Documentation - Part 95\n", 8 | "\n", 9 | "This notebook covers pandas development practices, documentation standards, and type hinting." 10 | ] 11 | }, 12 | { 13 | "cell_type": "markdown", 14 | "metadata": {}, 15 | "source": [ 16 | "##### Git Workflow for Contributing\n", 17 | "\n", 18 | "When contributing to pandas, it's important to follow proper Git workflow practices:" 19 | ] 20 | }, 21 | { 22 | "cell_type": "markdown", 23 | "metadata": {}, 24 | "source": [ 25 | "```bash\n", 26 | "# Create and switch to a feature branch\n", 27 | "git checkout -b shiny-new-feature\n", 28 | "\n", 29 | "# Keep your master branch up to date\n", 30 | "git checkout master\n", 31 | "git pull upstream master --ff-only\n", 32 | "\n", 33 | "# Switch back to your feature branch\n", 34 | "git checkout shiny-new-feature\n", 35 | "```" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "metadata": {}, 41 | "source": [ 42 | "##### Documentation Standards\n", 43 | "\n", 44 | "Pandas documentation is written in reStructuredText (reST) and built using Sphinx. The documentation consists of two parts:\n", 45 | "\n", 46 | "1. Docstrings in the code itself\n", 47 | "2. Documentation in the `doc/` folder (tutorials, overviews, etc.)" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "metadata": {}, 53 | "source": [ 54 | "### Docstring Example\n", 55 | "\n", 56 | "Pandas follows a convention based on the NumPy Docstring Standard. Here's an example of a properly formatted docstring:" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 1, 62 | "metadata": {}, 63 | "outputs": [], 64 | "source": [ 65 | "def add(num1, num2):\n", 66 | " \"\"\"\n", 67 | " Add up two integer numbers.\n", 68 | "\n", 69 | " This function simply wraps the `+` operator, and does not\n", 70 | " do anything interesting, except for illustrating what is\n", 71 | " the docstring of a very simple function.\n", 72 | "\n", 73 | " Parameters\n", 74 | " ----------\n", 75 | " num1 : int\n", 76 | " First number to add\n", 77 | " num2 : int\n", 78 | " Second number to add\n", 79 | "\n", 80 | " Returns\n", 81 | " -------\n", 82 | " int\n", 83 | " The sum of `num1` and `num2`\n", 84 | "\n", 85 | " See Also\n", 86 | " --------\n", 87 | " subtract : Subtract one integer from another\n", 88 | "\n", 89 | " Examples\n", 90 | " --------\n", 91 | " >>> add(2, 2)\n", 92 | " 4\n", 93 | " >>> add(25, 0)\n", 94 | " 25\n", 95 | " >>> add(10, -10)\n", 96 | " 0\n", 97 | " \"\"\"\n", 98 | " return num1 + num2" 99 | ] 100 | }, 101 | { 102 | "cell_type": "markdown", 103 | "metadata": {}, 104 | "source": [ 105 | "##### Type Hinting in Pandas\n", 106 | "\n", 107 | "Pandas uses type hints to improve code readability and enable static type checking. Here are some best practices for type hinting in pandas:" 108 | ] 109 | }, 110 | { 111 | "cell_type": "markdown", 112 | "metadata": {}, 113 | "source": [ 114 | "### Using Standard Type Hints" 115 | ] 116 | }, 117 | { 118 | "cell_type": "code", 119 | "execution_count": 2, 120 | "metadata": {}, 121 | "outputs": [], 122 | "source": [ 123 | "from typing import List, Optional, Union\n", 124 | "\n", 125 | "# Good practice\n", 126 | "primes: List[int] = []\n", 127 | "\n", 128 | "# Use Optional for values that might be None\n", 129 | "# Instead of: maybe_primes: List[Union[int, None]] = []\n", 130 | "maybe_primes: List[Optional[int]] = []" 131 | ] 132 | }, 133 | { 134 | "cell_type": "markdown", 135 | "metadata": {}, 136 | "source": [ 137 | "### Handling Shadowed Builtins\n", 138 | "\n", 139 | "When a class variable shadows a builtin, create an unambiguous alias:" 140 | ] 141 | }, 142 | { 143 | "cell_type": "code", 144 | "execution_count": 3, 145 | "metadata": {}, 146 | "outputs": [], 147 | "source": [ 148 | "# Create an alias for the builtin\n", 149 | "str_type = str\n", 150 | "\n", 151 | "class SomeClass:\n", 152 | " str: str_type = None" 153 | ] 154 | }, 155 | { 156 | "cell_type": "markdown", 157 | "metadata": {}, 158 | "source": [ 159 | "### Avoiding Type Casting\n", 160 | "\n", 161 | "Using `cast` from the typing module is discouraged. Instead, refactor code to make type checking clearer:" 162 | ] 163 | }, 164 | { 165 | "cell_type": "code", 166 | "execution_count": 4, 167 | "metadata": {}, 168 | "outputs": [], 169 | "source": [ 170 | "from typing import Union\n", 171 | "\n", 172 | "# Discouraged approach\n", 173 | "'''\n", 174 | "from typing import cast\n", 175 | "from pandas.core.dtypes.common import is_number\n", 176 | "\n", 177 | "def cannot_infer_bad(obj: Union[str, int, float]):\n", 178 | " if is_number(obj):\n", 179 | " ...\n", 180 | " else:\n", 181 | " obj = cast(str, obj) # Mypy complains without this!\n", 182 | " return obj.upper()\n", 183 | "'''\n", 184 | "\n", 185 | "# Preferred approach\n", 186 | "def cannot_infer_good(obj: Union[str, int, float]):\n", 187 | " if isinstance(obj, str):\n", 188 | " return obj.upper()\n", 189 | " else:\n", 190 | " # Handle numeric types\n", 191 | " pass" 192 | ] 193 | }, 194 | { 195 | "cell_type": "markdown", 196 | "metadata": {}, 197 | "source": [ 198 | "### Pandas-specific Types\n", 199 | "\n", 200 | "Pandas provides custom types in the `pandas._typing` module for common patterns:" 201 | ] 202 | }, 203 | { 204 | "cell_type": "code", 205 | "execution_count": 5, 206 | "metadata": {}, 207 | "outputs": [], 208 | "source": [ 209 | "# Example of using pandas-specific types\n", 210 | "import pandas as pd\n", 211 | "import numpy as np\n", 212 | "\n", 213 | "# This is conceptual code showing how pandas types would be used\n", 214 | "# The actual _typing module is private and may change\n", 215 | "\n", 216 | "'''\n", 217 | "from pandas._typing import Dtype\n", 218 | "\n", 219 | "def as_type(dtype: Dtype):\n", 220 | " # This function accepts various dtype formats:\n", 221 | " # - String like \"object\"\n", 222 | " # - NumPy dtype like np.int64\n", 223 | " # - Pandas ExtensionDtype like pd.CategoricalDtype\n", 224 | " pass\n", 225 | "'''\n", 226 | "\n", 227 | "# Example of different dtype formats that would be accepted\n", 228 | "string_dtype = \"object\"\n", 229 | "numpy_dtype = np.int64\n", 230 | "pandas_dtype = pd.CategoricalDtype()" 231 | ] 232 | }, 233 | { 234 | "cell_type": "markdown", 235 | "metadata": {}, 236 | "source": [ 237 | "### Validating Type Hints\n", 238 | "\n", 239 | "Pandas uses mypy to statically analyze the code base and type hints. After making changes, you can validate your type hints by running:" 240 | ] 241 | }, 242 | { 243 | "cell_type": "markdown", 244 | "metadata": {}, 245 | "source": [ 246 | "```bash\n", 247 | "mypy pandas\n", 248 | "```" 249 | ] 250 | }, 251 | { 252 | "cell_type": "markdown", 253 | "metadata": {}, 254 | "source": [ 255 | "##### Continuous Integration\n", 256 | "\n", 257 | "Pandas uses Travis-CI and Azure Pipelines for continuous integration testing. Pull requests are considered for merging when they have an all 'green' build, indicating that all tests have passed." 258 | ] 259 | }, 260 | { 261 | "cell_type": "markdown", 262 | "metadata": {}, 263 | "source": [ 264 | "##### Practical Example: Creating a Function with Type Hints and Documentation" 265 | ] 266 | }, 267 | { 268 | "cell_type": "code", 269 | "execution_count": 6, 270 | "metadata": {}, 271 | "outputs": [ 272 | { 273 | "name": "stdout", 274 | "output_type": "stream", 275 | "text": [ 276 | "Original DataFrame:\n", 277 | " A B\n", 278 | "0 1.0 a\n", 279 | "1 2.0 b\n", 280 | "2 3.0 c\n", 281 | "3 NaN d\n", 282 | "\n", 283 | "Filtered DataFrame (without NAs):\n", 284 | " A B\n", 285 | "0 1.0 a\n", 286 | "2 3.0 c\n", 287 | "\n", 288 | "Filtered DataFrame (with NAs):\n", 289 | " A B\n", 290 | "0 1.0 a\n", 291 | "2 3.0 c\n", 292 | "3 NaN d\n" 293 | ] 294 | } 295 | ], 296 | "source": [ 297 | "from typing import List, Union, Optional\n", 298 | "import pandas as pd\n", 299 | "import numpy as np\n", 300 | "\n", 301 | "def filter_dataframe(df: pd.DataFrame, \n", 302 | " column: str, \n", 303 | " values: List[Union[str, int, float]], \n", 304 | " keep_na: Optional[bool] = False) -> pd.DataFrame:\n", 305 | " \"\"\"\n", 306 | " Filter a DataFrame to include only rows where the specified column values are in the given list.\n", 307 | " \n", 308 | " Parameters\n", 309 | " ----------\n", 310 | " df : pd.DataFrame\n", 311 | " The DataFrame to filter\n", 312 | " column : str\n", 313 | " The column name to filter on\n", 314 | " values : List[Union[str, int, float]]\n", 315 | " List of values to include\n", 316 | " keep_na : bool, optional\n", 317 | " Whether to keep NA values in the filtered result, by default False\n", 318 | " \n", 319 | " Returns\n", 320 | " -------\n", 321 | " pd.DataFrame\n", 322 | " Filtered DataFrame containing only rows where the column value is in the values list\n", 323 | " \n", 324 | " Examples\n", 325 | " --------\n", 326 | " >>> df = pd.DataFrame({'A': [1, 2, 3, None], 'B': ['a', 'b', 'c', 'd']})\n", 327 | " >>> filter_dataframe(df, 'A', [1, 3])\n", 328 | " A B\n", 329 | " 0 1 a\n", 330 | " 2 3 c\n", 331 | " \n", 332 | " >>> filter_dataframe(df, 'A', [1, 3], keep_na=True)\n", 333 | " A B\n", 334 | " 0 1 a\n", 335 | " 2 3 c\n", 336 | " 3 None d\n", 337 | " \"\"\"\n", 338 | " if keep_na:\n", 339 | " return df[df[column].isin(values) | df[column].isna()]\n", 340 | " else:\n", 341 | " return df[df[column].isin(values)]\n", 342 | "\n", 343 | "# Example usage\n", 344 | "df = pd.DataFrame({\n", 345 | " 'A': [1, 2, 3, None], \n", 346 | " 'B': ['a', 'b', 'c', 'd']\n", 347 | "})\n", 348 | "\n", 349 | "print(\"Original DataFrame:\")\n", 350 | "print(df)\n", 351 | "print(\"\\nFiltered DataFrame (without NAs):\")\n", 352 | "print(filter_dataframe(df, 'A', [1, 3]))\n", 353 | "print(\"\\nFiltered DataFrame (with NAs):\")\n", 354 | "print(filter_dataframe(df, 'A', [1, 3], keep_na=True))" 355 | ] 356 | } 357 | ], 358 | "metadata": { 359 | "kernelspec": { 360 | "display_name": "venv", 361 | "language": "python", 362 | "name": "python3" 363 | }, 364 | "language_info": { 365 | "codemirror_mode": { 366 | "name": "ipython", 367 | "version": 3 368 | }, 369 | "file_extension": ".py", 370 | "mimetype": "text/x-python", 371 | "name": "python", 372 | "nbconvert_exporter": "python", 373 | "pygments_lexer": "ipython3", 374 | "version": "3.13.2" 375 | } 376 | }, 377 | "nbformat": 4, 378 | "nbformat_minor": 4 379 | } 380 | -------------------------------------------------------------------------------- /pandas_pdf/pandas.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/pandas.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_001.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_001.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_002.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_002.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_003.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_003.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_004.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_004.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_005.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_005.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_006.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_006.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_007.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_007.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_008.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_008.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_009.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_009.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_010.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_010.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_011.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_011.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_012.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_012.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_013.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_013.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_014.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_014.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_015.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_015.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_016.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_016.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_017.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_017.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_018.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_018.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_019.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_019.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_020.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_020.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_021.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_021.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_022.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_022.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_023.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_023.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_024.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_024.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_025.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_025.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_026.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_026.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_027.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_027.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_028.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_028.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_029.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_029.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_030.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_030.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_031.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_031.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_032.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_032.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_033.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_033.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_034.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_034.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_035.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_035.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_036.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_036.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_037.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_037.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_038.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_038.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_039.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_039.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_040.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_040.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_041.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_041.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_042.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_042.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_043.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_043.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_044.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_044.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_045.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_045.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_046.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_046.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_047.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_047.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_048.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_048.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_049.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_049.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_050.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_050.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_051.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_051.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_052.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_052.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_053.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_053.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_054.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_054.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_055.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_055.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_056.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_056.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_057.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_057.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_058.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_058.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_059.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_059.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_060.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_060.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_061.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_061.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_062.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_062.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_063.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_063.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_064.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_064.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_065.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_065.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_066.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_066.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_067.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_067.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_068.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_068.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_069.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_069.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_070.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_070.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_071.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_071.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_072.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_072.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_073.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_073.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_074.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_074.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_075.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_075.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_076.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_076.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_077.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_077.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_078.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_078.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_079.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_079.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_080.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_080.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_081.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_081.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_082.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_082.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_083.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_083.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_084.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_084.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_085.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_085.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_086.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_086.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_087.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_087.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_088.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_088.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_089.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_089.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_090.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_090.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_091.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_091.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_092.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_092.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_093.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_093.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_094.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_094.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_095.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_095.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_096.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_096.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_097.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_097.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_098.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_098.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_099.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_099.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_100.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_100.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_101.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_101.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_102.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_102.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_103.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_103.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_104.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_104.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_105.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_105.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_106.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_106.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_107.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_107.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_108.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_108.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_109.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_109.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_110.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_110.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_111.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_111.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_112.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_112.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_113.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_113.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_114.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_114.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_115.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_115.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_116.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_116.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_117.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_117.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_118.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_118.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_119.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_119.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_120.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_120.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_121.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_121.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_122.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_122.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_123.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_123.pdf -------------------------------------------------------------------------------- /pandas_pdf/part_124.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/analyticsbot/pandas-tutorial/5f4baca176f9211d5289fbd467cb2eb16bd55e43/pandas_pdf/part_124.pdf -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | nbformat>=5.1.0 2 | nbconvert>=6.0.0 3 | pandas>=1.3.0 4 | matplotlib>=3.4.0 5 | numpy>=1.20.0 6 | ipykernel>=6.0.0 7 | jupyter>=1.0.0 8 | numba 9 | scipy>=1.0.0 10 | pytest>=7.0.0 11 | openpyxl>=3.0.0 12 | lxml>=4.6.0 13 | tables>=3.6.0 14 | pyarrow>=7.0.0 15 | pandas-datareader>=0.10.0 16 | yfinance>=0.2.30 17 | seaborn>=0.12.0 18 | html5lib>=1.1 19 | sqlalchemy>=2.0.0 --------------------------------------------------------------------------------