Machine Learning, Deep Learning, AI, Pandas, Data Analysis.
[[ 0 10] [ 1 15] [ 2 20]] firstRow = [['id', 'pred']] with open("result.csv", "wb") as f: writer = csv.writer(f) writer.writerows(firstRow) writer.writerows(results) Other Useful Functions drop() — This function removes the column or row that you pass in (You also have the specify the axis). agg()