Dictionary
You use a key to find its corresponding value:
-7.5
@@ -463,7 +508,7 @@ Dictionary
You cannot use a numerical index to find values, like you did for Lists!
- @@ -484,7 +529,7 @@Rules of Dictionaries
Rules of Dictionaries
'skating'
@@ -511,26 +556,26 @@ Rules of Dictionaries
Using key to find values
-If a key doesn’t exist, you will get an error:
-If you don’t want to run the risk of getting an error, you can specify a default value using the .get() method.
None
@@ -549,14 +594,14 @@ Using key to find values
Adding new key-value pairs
You can add more key-value pairs by defining it directly. If the key already exists, the mapping for that key will simply be updated.
-Application: Creating a Dataframe
You can create a Dataframe using a Dictionary. The key represent column names, and the value is a List containing the column’s values:
-import pandas as pd
simple_df = pd.DataFrame(data={'id': ["AAA", "BBB", "CCC", "DDD", "EEE"],
@@ -645,7 +690,7 @@ Application: Creating a Dataframe
Application: Data Recoding
You want to take “case_control” column of simple_df and change “case” to “experiment” and “control” to “baseline”.
This correspondence relationship can be stored in a dictionary via .replace() method for Series:
-
+
0 experiment
diff --git a/slides/lesson1_slides.qmd b/slides/lesson1_slides.qmd
index 08f3781..b461663 100644
--- a/slides/lesson1_slides.qmd
+++ b/slides/lesson1_slides.qmd
@@ -5,11 +5,12 @@ format:
smaller: false
scrollable: true
echo: true
+ standalone: true
---
## Welcome!
-Please sign up for Google Classroom ([link](https://classroom.google.com/c/ODIzOTg2OTExNzU5?cjc=qfqni3j4) if you haven't already.
+Please sign up for Google Classroom ([link](https://classroom.google.com/c/ODIzOTg2OTExNzU5?cjc=qfqni3j4)) if you haven't already.
## Introductions
@@ -43,16 +44,30 @@ Please sign up for Google Classroom ([link](https://classroom.google.com/c/ODIzO
[https://colab.research.google.com/drive/1g2ylY3-s_jX2Yf2CGkIdApvgTP4vb0Dw?usp=sharing](https://colab.research.google.com/drive/1g2ylY3-s_jX2Yf2CGkIdApvgTP4vb0Dw?usp=sharinghttps://colab.research.google.com/drive/1g2ylY3-s_jX2Yf2CGkIdApvgTP4vb0Dw?usp=sharing)
-## Content of the course
+## Tentative Schedule
+
+| Week | Date | Topic |
+|------|------|-------|
+|1* | Jan 21 | [Fundamentals](01-Fundamentals.qmd) |
+|2 | Jan 28 | [Iteration (for loops)](02-Iteration.qmd) |
+|3* | Feb 4 | [Conditionals](03-Conditionals.qmd) |
+|4 | Feb 11 | [Functions](04-Functions.qmd) |
+|No Class | Feb 18 | Break week |
+|5 | Feb 25 | [Iteration Styles](05-Iteration_Styles.qmd) |
+|6* | Mar 4 | [Reference vs. Copy](06-Reference_vs_Copy.qmd) / Last Day of Class |
+
+* = Ted on Campus for class
+
+
+## More About the Schedule
+
+All classes are on Wednesdays from 12:00-1:30 PM PST either online, or in Arnold M1-B406 (The Data Science Lounge). Connection details will be provided. Office hours related to each class day are posted below, and the invite will be sent to you.
+
+
+In class we will be going through the notebooks hosted on Google Classroom.
+
+Classes will be recorded, and those recordings will be sent to you after each class.
-1. Fundamentals and Dictionaries
-2. Iteration
-3. Functions
-4. Iteration styles
-5. Assignment and References
-6. Mid-winter break! (for Seattle Public Schools)
-7. Modules, Wrap-up, Pizza!
-8. Optional: Data-a-thon Friday March 14, Learning Communities
Full course page here:
diff --git a/slides/lesson2_slides.html b/slides/lesson2_slides.html
index 8a12734..1b97069 100644
--- a/slides/lesson2_slides.html
+++ b/slides/lesson2_slides.html
@@ -6,9 +6,8 @@
-
-
-
+
+
W2: Iteration
@@ -29,8 +28,9 @@
vertical-align: middle;
}
/* CSS for syntax highlighting */
+ html { -webkit-text-size-adjust: 100%; }
pre > code.sourceCode { white-space: pre; position: relative; }
- pre > code.sourceCode > span { line-height: 1.25; }
+ pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
@@ -41,7 +41,7 @@
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
- pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
+ pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
@@ -94,209 +94,11 @@
code span.vs { color: #20794d; } /* VerbatimString */
code span.wa { color: #5e5e5e; font-style: italic; } /* Warning */
-
+
-