The Scenario
I've read a csv (which is \t seperated) into a Dataframe, which is now needed to be in a numpy array format for clustering without changing type
The Problem
So far as per tried references (below) I've failed to get the output as required. The two column's values I'm trying to fetch are in int64 / float64, as below
uid iid rat
0 196 242 3.000000
1 186 302 3.000000
2 22 377 1.000000
I'm intrested in only iid and rat for the moment, and to pass it to Kmeans.fit() method and that too not with EPSILON in it. I need it in following format
Expected format
[[242, 3.000000],
[302, 3.000000],
[22, 1.000000]]
Unsucessful Attempt
X = values[:, 1:2]
Y = values[:, 2:3]
someArray = np.array([X,Y])
print someArray
and doesn't farewell on execution
[[[ 2.42000000e+02]
[ 3.02000000e+02]
[ 3.77000000e+02]
...,
[ 1.35200000e+03]
[ 1.62600000e+03]
[ 1.65900000e+03]]
[[ 3.00000000e+00]
[ 3.00000000e+00]
[ 1.00000000e+00]
...,
[ 1.00000000e+00]
[ 1.00000000e+00]
[ 1.00000000e+00]]]
Unhelped references so far
EDIT 1
tried np_df = np.genfromtxt('AllData.csv', delimiter='\t', unpack=True)
and got this
[[ nan 1.96000000e+02 1.86000000e+02 ..., 4.79000000e+02
4.79000000e+02 4.79000000e+02]
[ nan 2.42000000e+02 3.02000000e+02 ..., 1.36000000e+03
1.39400000e+03 1.65200000e+03]
[ nan 3.00000000e+00 3.00000000e+00 ..., 2.00000000e+00
1.92803605e+00 1.00000000e+00]]