title: How to print comma seperated output?
body: <pre><code>from sklearn.ensemble import RandomForestClassifier
  model = RandomForestClassifier(n_estimators = 200)
  model.fit(x_train, y_train)
  y_pred = model.predict(x_test)
  
  preds=le.inverse_transform(y_pred)
  datatocsv=pd.DataFrame({'id':range(1,len(preds)+1),'taste':preds})
  datatocsv.to_csv('prediction.csv',index=False)
  </code></pre>
  <p>Suppose I  have saved the prediction output in a csv file named prediction.csv
  and this csv file has two columns 'id' and 'taste' column</p>
  <p><img src="https://i.stack.imgur.com/gO88P.jpg" alt="output_format image" /></p>
  <p>But I want to print the prediction output in the format specified in the image.
  Please guide</p>