I am creating a table of data in Python to print on the console using the code below:
print("Model Results:\n")
print("R&D Spend\tAdministration\tMarketing Spend\tState\tPredicted Profit")
for i in range(50):
print("%0.2f\t%0.2f\t%0.2f\t%d\t%0.2f"%(
X_test[i][0],X_test[i][1],X_test[i][2],X_test[i][3], y_predict[i]))
The trouble is some of the rows are not displaying correctly (highlighted in the attached screenshot). This seems to happen for rows where the first column is 4 figures. What trick can I use to overcome this?
This is the console output with my table: