Live Lecture 1.2
Cause and Effect, Names, Call Expressions,
Data Types, and Tables
Summer 2020
DATA 8
Spring 2020
Announcements
Agenda
Cause and Effect
Two types of studies:
Confounding factors - systematic differences, other than the treatment itself, between the treatment and control group
Cause and Effect
Confounding factors are more common in observational studies.
Why?
Agenda
Data Types
Python has two real number types
Data Types
Python has two real number types
A string is a snippet of text of any length
Agenda
Names and Call Expressions
f ( 27 )
What function to call
Argument to the function
"Call f on 27."
hours_per_wk = 24*7
Name
Any expression
Names:
Call Expressions:
Names and Call Expressions
f ( 27 )
What function to call
Argument to the function
"Call f on 27."
Call Expressions:
Toy Example:
If we define f(x) = x + 1, then the snippet above would produce a value of 28
Agenda
Arrays
An array contains a sequence of values
DEMO
A range is an array of consecutive numbers
Table Structure
Name | Code | Area (m2) |
California | CA | 163696 |
Nevada | NV | 110567 |
Label
Column
Row
Some Table Operations
DEMO
Recap and Questions