APPENDIX 2: PRINT COLUMNS
A code shortcut for printing columns with the necessary formatting to use as input for model prediction, as discussed in Chapter 10, can be generated using the following code.
cols = df.columns.tolist()
print("new_project = [")
for item in cols:
print("\t0, "+"#"+item)
print("]")
Run the temporary code in Jupyter Notebook.
Now copy and paste the code output you have generated back into the notebook for the next section of your code. Also note that this temporary code prints all variables (including X and y variables) and you may need to remove the dependent variable (y) from the code, which in this case is State_successful.