diff --git a/02_R_function_basics/02_Lecture_Python.ipynb b/02_R_function_basics/02_Lecture_Python.ipynb index 26a50ac..4f26bf3 100644 --- a/02_R_function_basics/02_Lecture_Python.ipynb +++ b/02_R_function_basics/02_Lecture_Python.ipynb @@ -198,26 +198,18 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 5, "id": "b3520bbc", "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "initiated datasets repo at: /Users/amelianorman/.pydataset/\n" - ] - } - ], + "outputs": [], "source": [ "import pandas as pd\n", - "from pydataset import data" + "from pydataset import data # need to pip install this package, not part of the conda distubution" ] }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 3, "id": "c7700c05", "metadata": {}, "outputs": [ @@ -339,7 +331,7 @@ "5 audi a4 2.8 1999 6 auto(l5) f 16 26 p compact" ] }, - "execution_count": 5, + "execution_count": 3, "metadata": {}, "output_type": "execute_result" } @@ -1045,7 +1037,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 18, "id": "2ce945cd", "metadata": {}, "outputs": [ @@ -1237,13 +1229,13 @@ "[5 rows x 35 columns]" ] }, - "execution_count": 26, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "weather = pd.read_csv('~/Desktop/DS-3001/data/weather.csv') # Tip: use read_excel if using an excel file!\n", + "weather = pd.read_csv('../data/weather.csv') # Tip: use read_excel if using an excel file!\n", "weather.head()" ] }, @@ -1259,7 +1251,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 19, "id": "21029a92", "metadata": {}, "outputs": [ @@ -1451,7 +1443,7 @@ "[5 rows x 31 columns]" ] }, - "execution_count": 29, + "execution_count": 19, "metadata": {}, "output_type": "execute_result" } @@ -1474,7 +1466,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 20, "id": "ad067e3e", "metadata": {}, "outputs": [ @@ -1666,7 +1658,7 @@ "[5 rows x 31 columns]" ] }, - "execution_count": 30, + "execution_count": 20, "metadata": {}, "output_type": "execute_result" } @@ -2215,6 +2207,48 @@ "## Basic data types in `pandas`\n", "![Data Types](pandas_datatypes.png)" ] + }, + { + "cell_type": "markdown", + "id": "6b5fc3b1", + "metadata": {}, + "source": [ + "## Some other Python Basics" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "97b59a2d", + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'c:\\\\Users\\\\Brian Wright\\\\Documents\\\\3001Python\\\\DS-3001\\\\02_R_function_basics'" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# How to check our current working directory\n", + "import os\n", + "os.getcwd()" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "7d35231f", + "metadata": {}, + "outputs": [], + "source": [ + "# How to load data in Python using Pandas and a relative path\n", + "data = pd.read_csv(\"../data/bank.csv\") # Here we are using the relative path to load data from the data folder, thus the \"..\". " + ] } ], "metadata": { diff --git a/README.md b/README.md index 7908d16..e744781 100644 --- a/README.md +++ b/README.md @@ -113,21 +113,21 @@ The books below are essentially a starter Machine Learning Library. I will use a | Week | Theme | Topics | Lab | Reading/Repo (Prior to Class) | |:---: |:---: |:---: |:---: |:---: | -| Week 1 | What is this “Data Science” that you speak of and tech stack | - Assessment - Videos: DS Overview and History | - Find DS Dream Job - Create your first project, load the dataset, visualize using the code provided what questions could this data answer? | Synchronous: Short Lab | -| Week 2 | Getting back up to “coding speed” | 'Dataframing' with pandas functions | [- Group Case Study - Questions + PsuedoCode + Code + Functions = High Quality Data Science](02_R_function_basics/02_Lecture_Python.ipynb) | TBD| -| Week 3 | How to share nicely | Using Quarto to Create HTML Docs | (03_knitr_Comms) | [Documentation](https://quarto.org/docs/output-formats/html-basics.html) | -| Week 4 | Introduction to ML Concepts I |Language of ML | [Case Studies](https://github.com/UVADS/DS-3001/tree/main/04_ML_Concepts_I_Foundations)|H: Chapter 1 and 2 | -| Week 5 | Introduction to ML Concepts II | Data Preparation:kNN |[ML Concepts](https://github.com/UVADS/DS-3001/tree/main/05_ML_Concepts_II_Data_Prep)|H: 3 and 4 | -| Week 6 | Introduction to ML Concepts III | Machine Learning Process:kNN|[ML Concepts ](https://github.com/UVADS/DS-3001/tree/main/06_ML_Concepts_II_KNN) |H: Chapters 3 and 4 | -| Week 7| Spring Break| | | -| Week 8 | Introduction to ML Concepts IV | Evaluation | [Evaluation Lab](https://github.com/UVADS/DS-3001/tree/main/07_ML_Eval_Metrics) | All of B. and G.- Chapter 11 | -| Week 9 | Nature's Perfect ML analogy: Trees Part I | Classification: Decisions Trees | [ Decision Trees](https://github.com/UVADS/DS-3001/tree/main/08_DT_Class) | F. Chapter 5 and G. Chapter 14.1-14.3 | -| Week 10 | Nature's Perfect ML analogy: Trees Part II | Regression: Decision Trees | [Predicting Income for Big Brother] | F. Chapter 5 and G. Chapter 8 | -| Week 11 | Wisdom of the Crowd | Ensemble Methods I | [Random Forest Classifier ](https://github.com/UVADS/DS-3001/tree/main/12_Ensemble_RF) | TBD | -| Week 12 | Kaggle Competition | | | | -| Week 13 | Let's gather together... but separately |Unsupervised: Overview of Clustering Kmeans | [NBA Scout for the worst team in the league](https://github.com/UVADS/DS-3001/tree/main/10_kMeans%20Clustering)| F. Chapter 1 and Chapter 9 | -| Week 14 | Do the next right thing…ethics | Bias in AI Discussion -Simple methods for identifying bias - Protected Classes |[Fairness Overview & Ethical Reflections](https://github.com/UVADS/DS-3001/tree/main/14_ML_Bias) | Weapons of Math Destruction | -| Week 15 | Final Project Prep |[Final Project Overview](https://github.com/UVADS/DS-3001/blob/main/final_project_overview.md) | | Ethical Reflection Due | +| Week 1 Aug 20th | What is this “Data Science” that you speak of and tech stack | - Assessment - Videos: DS Overview and History | - Find DS Dream Job - Create your first project, load the dataset, visualize using the code provided what questions could this data answer? | Synchronous: Short Lab | +| Week 2 Aug 27th | Getting back up to “coding speed” | 'Dataframing' with pandas functions | [- Group Case Study - Questions + PsuedoCode + Code + Functions = High Quality Data Science](02_R_function_basics/02_Lecture_Python.ipynb) | TBD| +| Week 3 Sep 3rd | How to share nicely | Using Quarto to Create HTML Docs | (03_knitr_Comms) | [Documentation](https://quarto.org/docs/output-formats/html-basics.html) | +| Week 4 Sep 10th | Introduction to ML Concepts I |Language of ML | [Case Studies](https://github.com/UVADS/DS-3001/tree/main/04_ML_Concepts_I_Foundations)|TBD | +| Week 5 Sep 17th | Introduction to ML Concepts II | Data Preparation:kNN |[ML Concepts](https://github.com/UVADS/DS-3001/tree/main/05_ML_Concepts_II_Data_Prep)|TBD | +| Week 6 Sep 24th | Introduction to ML Concepts III | Machine Learning Process:kNN|[ML Concepts ](https://github.com/UVADS/DS-3001/tree/main/06_ML_Concepts_II_KNN) |TBD | +| Week 7 Oct 1st| Fall Break no Tuesday Class| | | +| Week 8 Oct 8th | Introduction to ML Concepts IV | Evaluation | [Evaluation Lab](https://github.com/UVADS/DS-3001/tree/main/07_ML_Eval_Metrics) | All of B. and G.- Chapter 11 | +| Week 9 Oct 15th | Nature's Perfect ML analogy: Trees Part I | Classification: Decisions Trees | [ Decision Trees](https://github.com/UVADS/DS-3001/tree/main/08_DT_Class) | TBD and G. Chapter 14.1-14.3 | +| Week 10 Oct 22nd | Nature's Perfect ML analogy: Trees Part II | Regression: Decision Trees | [Predicting Income for Big Brother] | F. Chapter 5 and G. Chapter 8 | +| Week 11 Oct 29th | Wisdom of the Crowd | Ensemble Methods I | [Random Forest Classifier ](https://github.com/UVADS/DS-3001/tree/main/12_Ensemble_RF) | TBD | +| Week 12 Nov 5th | Kaggle Competition - No Class on the 7th Election Day | | | | +| Week 13 Nov 12th | Let's gather together... but separately |Unsupervised: Overview of Clustering Kmeans | [NBA Scout for the worst team in the league](https://github.com/UVADS/DS-3001/tree/main/10_kMeans%20Clustering)| TBD | +| Week 14 Nov 19th | Do the next right thing…ethics | Bias in AI Discussion -Simple methods for identifying bias - Protected Classes |[Fairness Overview & Ethical Reflections](https://github.com/UVADS/DS-3001/tree/main/14_ML_Bias) | Weapons of Math Destruction | +| Week 15 Nov 26th | Final Project Prep |[Final Project Overview](https://github.com/UVADS/DS-3001/blob/main/final_project_overview.md) | | Ethical Reflection Due | | Week 16 - Final TBD | Final Projects Presentations | [Final Project Overview](https://github.com/UVADS/DS-3001/blob/main/final_project_overview.md) | | | ## A few Policies that will Govern the Class