import pandas as pd, what exactly is pd?
An alias/nickname so you don't have to type pandas every time
Names, addresses, birthdates, biometrics are referred to as what acronym?
PII, personally identifiable information
The value pandas uses to mark missing data once a file is loaded.
NaN (from np.nan; None also)
In y = mx + b language: β1 is the ___, β0 is the ___.
Slope (coefficient) and intercept
What is the matplotlib call that drops a vertical line at x = 2020?
ax.axvline(2020)
Your co-worker is attempting to create a new column called 'data science' in their Python DataFrame called codeworks, but they keep getting an error when they run this, why?
codeworks[data science] =
no quotes around data science/new column name
codeworks['data science'] =
Ethics shows up at four points in a project, what are they? Extra 500: Annotators labeled friendly AAVE tweets as toxic; the model now flags them at 90%+. Which checkpoint failed, and why does the model keep repeating the mistake?
The team, the data, the analysis, and after the algorithm. Extra 500: The data: biased human labels; any bias in the data is perpetuated by the model
Maryland masks cells with asterisks, NYC uses 's'; how would I make this column numeric? Simultaneously making these values blank.
pd.to_numeric(col, errors="coerce")
smf.ols("Circumference ~ Height", data=trees) — which variable is the outcome Y?
Circumference: the left side of the ~ is always the dependent variable
The class put project code here for the world to see; and sending your saved changes up to it is called this. Bonus 300 points: The file at the top of every repository that tells a stranger reading your respository what the project is and how to run it.
GitHub; pushing changes. Bonus: the READMe file.
.loc selects by ___, while .iloc selects by ___ counting from 0.
label; integer position
Analyzing Maryland entrepreneurs? Our lecture said your team should include this.
Someone from that community/a Maryland entrepreneur
What do we call it when every variable is a column, every observation is a row, every value its own cell.
Tidy data
Height's coefficient is 0.256 with P>|t| of 0.003. Is this significant at 0.05? And what does 0.256 mean in words?
Yes. Each 1-unit increase in height predicts about +0.256 circumference.
From our code-along: hide the top and right edges of the plot box, how?
sns.despine()
When do df.loc[2, "income"] and df.iloc[2, 1] return the very same value?
When label 2 sits at position 2 (fresh 0,1,2,… index; nothing filtered or re-sorted) and income is column position 1
After IBM's face dataset was used in ways people never consented to, what happened
People sued, the dataset came down, companies halted police sales
Which of these is the result of pd.merge(df_a,df_b,on='sample', how='right')
C
Comparing mean pain levels across three painkiller groups calls for this test (bonus 200 points: tell me its not-normal cousin).
ANOVA (Kruskal–Wallis if the data aren't normal)
Best figure for counts of one categorical variable; best figure for a value over time.
Bar chart; line plot
How would you flip the coordinates on a histogram?
plt.hist(orientation='horizontal') OR
plt.hist(orientation='vertical')
Ethical data science improves lives and avoids harm; just data science does what?
Improves the lives of the least well-off and encourages data sovereignty for those same groups
The same song appears five times from five releases. The two methods that when run back to back would keep only the most popular copy before a join.
sort_values("popularity", ascending=False) then drop_duplicates(...)
Age drives both shoe size and literacy. The name for age's role here, and one way regression deals with it.
A confounder. Add it as a control in multiple regression: literacy ~ shoe_size + age
What three things should a presentation do?
Inspire, educate, and entertain