How to fix common errors¶
Fix it yourself¶
If you see something like
pd is not definedlook for a cell that includes
import pandas as pdand make sure that is has been run.
If you see
NameErrorCheck that all of the code cells have a number to the left that says that they have run. If they have not, click on each one that has not yet run, and run that one again.
If you see output like
<bound method ...check that you used
To go back, use
tut.previous(3)to go back 3 steps, you can go back any number of steps
To repeat a step use
Useful cells to copy¶
These bits are common lines that are useful to copy, but knowing when to use them might require the advice of a a TA or helper.
df_pp = pd.read_csv("https://github.com/propublica/compas-analysis/raw/master/compas-scores-two-years.csv", header=0).set_index('id')
df = pd.read_csv('https://raw.githubusercontent.com/ml4sts/outreach-compas/main/data/compas_c.csv')
dfQ = pd.read_csv('https://raw.githubusercontent.com/ml4sts/outreach-compas/main/data/compas_cq.csv')