I am using np.genfromtxt to read a csv. I am not sure why it is raising a ValueError(errmsg) on the data. When I read the file in excel and it shows a total of 23 columns for all the 33 rows in the file
Here is the code and error:
csv = np.genfromtxt (fname, delimiter=",",names=True)
Here is a snippet of the csv records:
,mean_fit_time,mean_score_time,mean_test_score,mean_train_score,param_NN__alpha,param_NN__hidden_layer_sizes,params,rank_test_score,split0_test_score,split0_train_score,split1_test_score,split1_train_score,split2_test_score,split2_train_score,split3_test_score,split3_train_score,split4_test_score,split4_train_score,std_fit_time,std_score_time,std_test_score,std_train_score
0,0.34166226387023924,0.0010362625122070312,0.842927342927343,0.8468980402379758,0.1,"(7,)","{'NN__alpha': 0.1, 'NN__hidden_layer_sizes': (7,)}",25,0.8420706295240185,0.8475292052871167,0.8398771660451854,0.8463774474853288,0.845360824742268,0.846158065046893,0.8385256691531373,0.8486892618185806,0.8488040377441299,0.8457362215519605,0.05093153997183547,0.00018195987247183776,0.0037378988316037944,0.0010747322296072162
1,0.5543142318725586,0.0018250465393066407,0.8465250965250966,0.8527554135893668,0.1,"(25, 7)","{'NN__alpha': 0.1, 'NN__hidden_layer_sizes': (25, 7)}",5,0.846018863785918,0.8530137662480118,0.846018863785918,0.8589919376953875,0.8479929809168677,0.8496681840618658,0.8400614304519526,0.851486234506965,0.8525345622119815,0.8506169454346038,0.10835399357094619,0.00018853748087819175,0.004013613789285713,0.003306836154659678
2,0.5266880512237548,0.0013680458068847656,0.8437609687609687,0.8478413817137904,0.1,"(11, 7)","{'NN__alpha': 0.1, 'NN__hidden_layer_sizes': (11, 7)}",17,0.842509322219785,0.8479679701639884,0.8354902390875192,0.8431964021280096,0.8455801710901514,0.8520265452750507,0.8433523475208424,0.851595919710431,0.8518762343647136,0.8444200712914725,0.1041624682160838,0.0003233587082439388,0.005278162504355272,0.0036030369022985215
3,0.49459095001220704,0.0011162281036376954,0.8406458406458407,0.845428443186931,0.1,"(7, 5)","{'NN__alpha': 0.1, 'NN__hidden_layer_sizes': (7, 5)}",32,0.8383417416100022,0.848461580650469,0.8429480149155516,0.8501617945483464,0.8468962491774512,0.8514780891789612,0.8312856516015796,0.8381046396841066,0.8437568575817423,0.8389361118727722,0.10397613499936685,0.00018889068500539376,0.005421511394261151,0.005726975087304059
4,0.6175418376922608,0.0024899959564208983,0.8449017199017199,0.8508140227747922,0.1,"(25, 11, 7)","{'NN__alpha': 0.1, 'NN__hidden_layer_sizes': (25, 11, 7)}",11,0.8414125904803685,0.8493939560138211,0.8427286685676684,0.8546591345362804,0.8501864443957008,0.8519716996654417,0.8459850811759544,0.8564769112646704,0.8441957428132544,0.8415684123937482,0.1940231074769015,0.00047604030307216253,0.003049662553913791,0.005209439647677219
Error Received:
ValueError: Some errors were detected !
Line #2 (got 26 columns instead of 22)
Line #3 (got 26 columns instead of 22)
Line #4 (got 26 columns instead of 22)
Line #5 (got 26 columns instead of 22)
Line #6 (got 28 columns instead of 22)
Line #7 (got 26 columns instead of 22)
Line #8 (got 28 columns instead of 22)
Line #9 (got 26 columns instead of 22)
Line #10 (got 26 columns instead of 22)
Line #11 (got 26 columns instead of 22)
Line #12 (got 26 columns instead of 22)
Line #13 (got 26 columns instead of 22)
Line #14 (got 28 columns instead of 22)
Line #15 (got 26 columns instead of 22)
Line #16 (got 28 columns instead of 22)
Line #17 (got 26 columns instead of 22)
Line #18 (got 26 columns instead of 22)
Line #19 (got 26 columns instead of 22)
Line #20 (got 26 columns instead of 22)
Line #21 (got 26 columns instead of 22)
Line #22 (got 28 columns instead of 22)
Line #23 (got 26 columns instead of 22)
Line #24 (got 28 columns instead of 22)
Line #25 (got 26 columns instead of 22)
Line #26 (got 26 columns instead of 22)
Line #27 (got 26 columns instead of 22)
Line #28 (got 26 columns instead of 22)
Line #29 (got 26 columns instead of 22)
Line #30 (got 28 columns instead of 22)
Line #31 (got 26 columns instead of 22)
Line #32 (got 28 columns instead of 22)
Line #33 (got 26 columns instead of 22)