Xy = numpy.genfromtxt('yourfile.csv', delimiter=',')
skf = KFold(len(Xy))
for train_index, valid_index in skf:
    ind_train, ind_valid = train_index, valid_index
break
numpy array from csv file for lasagne