"The average daily trading volume of the S&P 500 over the past year."
Descriptive. It just summarizes / describes what's already in the data.
On a Mac, this one-word Terminal command prints the folder you are currently in.
pwd. Aside: on a Windows terminal/command line, it's "cd" with nothing after it
You run your code and get: FileNotFoundError: No such file or directory: 'data.csv'. What is actually wrong?
The file isn't where your code is looking. Fix the path so it points to where the file actually lives on your computer.
The pandas object that holds data in rows and columns, like a spreadsheet.
a dataframe
Reproducibility means a NEW researcher can get the same results using THIS.
The same data.
"Is there a pattern between hours of sleep and self-reported stress in students?"
Exploratory. Searching for relationships between variables.
The word for copying a GitHub repository down onto your own computer.
Clone (git clone)
The very first thing to do the moment you hit a red error (before searching or changing anything).
Read the error message. It often tells you exactly what's wrong. It always tells you which line has the error.
The pandas function that loads a CSV file into your notebook.
pd.read_csv()
The three levels of the reproducibility pyramid, from bottom to top.
"From a survey of 1,000 voters, what share of the whole national electorate supports a policy?"
Inferential. Using a small sample to say something about the whole group.
The name for the folder on your computer where your terminal work is taking place / the folder you are currently in / where your repo lives. (or, the thing pwd (Mac) or cd (Windows) shows you). Bonus: What we call the version of your repo that is cloned on your computer.
Your working directory.
Bonus: your local copy.
In Notebook 2, df.corr() throws error "ValueError: could not convert string to float." Add this argument to fix it.
numeric_only=True
df.corr(numeric_only=True)
Two ways to select rows/columns: one by label/name, one by integer position.
.loc (by label) and .iloc (by integer position)
Every time a notebook teaches you something new, you should do this. It's the new course rule.
Write it down, take notes.
"Given a user's viewing history, which movies will they rate highly?"
Predictive. Uses data from a large collection to predict values for new individuals.
The GitHub tool you need when a data file is too big for a normal push.
Git Large File Storage (LFS)
You run sns.heatmap(), but it says "sns not defined." What's the most likely reason?
You did not import the package with the alias/nickname sns. Install it, if needed (!pip install seaborn) and then import it (import seaborn as sns). All cells need to be run in order. Run your cell that installs and imports packages first.
What .corr() actually calculates between your numeric columns.
Correlation, or how strongly two variables move together
On the data science roadmap, the step right after "Form a question."
We take a small sample of kids, compare Sesame Street watchers vs. non-watchers, and use it to say something about ALL kids. What type is this?
Inferential. Small sample in, conclusion about the larger group out.
Put these three commands in the correct order: push origin main / commit -m "..." / add .
git add . → git commit -m "your message here" → git push origin main
Where you look for Python help, in order (not including the instructor). Name at least three.
Documentation
Lecture slides / past notebooks
Google Search
Stack Overflow / GeeksforGeeks
A classmate
then me.
What's wrong with this code? (Hint: There are two syntax errors)
newdf = data[(data['Date'] = '4/7/2019') & (data[PE PM2.5] > 3)]
wrong use of = instead of ==
missing quotes around the column name PE PM2.5
newdf = data[(data['Date'] == '4/7/2019') & (data['PE PM2.5'] > 3)]
Name the 6 steps of the data science pipeline, in order.
(1) Form a question (2) Get the data (3) Clean the data, (4) Plot the data (5) Get stats (6) Share results.