Scikit-learn: How to normalize row values horizontally?
<p>I would like to normalize the values below horizontally instead of vertically. The code read csv file provided after the code and output a new csv file with normalized values. How to make it normalize horizontally? Given the code as below:</p>

<p><strong>Code</strong></p>

<pre><code>#norm_code.py
#normalization = x-min/max-min

import numpy as np
from sklearn import preprocessing
all_data=np.loadtxt(open("c:/Python27/test.csv","r"),
delimiter=",",
skiprows=0,
dtype=np.float64)

x=all_data[:]

print('total number of samples (rows):', x.shape[0])
print('total number of features (columns):', x.shape[1])
minmax_scale = preprocessing.MinMaxScaler(feature_range=(0, 1)).fit(x)

X_minmax=minmax_scale.transform(x)
with open('test_norm.csv',"w") as f:
    f.write("\n".join(",".join(map(str, x)) for x in (X_minmax)))
</code></pre>

<p><strong>test.csv</strong></p>

<pre><code>1   2   0   4   3
3   2   1   1   0
2   1   1   0   1
</code></pre>