Skip to content

Instantly share code, notes, and snippets.

@neerajadsul
Created March 4, 2023 10:37
Show Gist options
  • Save neerajadsul/b40925055e9617f6c4b9de347b7be4eb to your computer and use it in GitHub Desktop.
Save neerajadsul/b40925055e9617f6c4b9de347b7be4eb to your computer and use it in GitHub Desktop.

Revisions

  1. neerajadsul created this gist Mar 4, 2023.
    8 changes: 8 additions & 0 deletions multiarray_columns_to_csv.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    from sklearn.datasets import make_moons

    X,y = make_moons(n_samples=200, noise=0.15)

    with open('data.csv', 'w') as f:
    wr = csv.writer(f, delimiter=',')
    combined = np.column_stack((X,y))
    wr.writerows(combined)