I have a Question, I have this lines:
s=codecs.open('file.csv', encoding="utf-8").read()
array1=np.asarray(s.splitlines())
print(array1)
and I become this results from array:
['39, State-gov, 77516, Bachelors, 13, Never-married, Adm-clerical, Not-in-family, White, Male, 2174, 0, 40, United-States, <=50K'
'50, Self-emp-not-inc, 83311, Bachelors, 13, Married-civ-spouse, Exec-managerial, Husband, White, Male, 0, 0, 13, United-States, <=50K'
'38, Private, 215646, HS-grad, 9, Divorced, Handlers-cleaners, Not-in-family, White, Male, 0, 0, 40, United-States, <=50K'
...
'36, Private, 146311, 9th, 5, Married-civ-spouse, Machine-op-inspct, Husband, White, Male, 0, 0, 40, United-States, <=50K'
'47, Self-emp-not-inc, 159869, Doctorate, 16, Married-civ-spouse, Craft-repair, Husband, White, Male, 0, 0, 50, United-States, <=50K'
'21, Private, 204641, Some-college, 10, Never-married,']
what I want is to transformate it into:
[['39', 'State-gov', '77516', 'Bachelors', '13',....,'<=50K]['50'...]]
also now is a Array with one row and many columns, and in each column is a string, and I want to change each column into one row with the numbers of columns that have the number of charachters..
I dont have any Idea about it, I wanted splited it but I cant
Could somebody helps me?
thanks!