So I have to split my data from a csv file.(Haven't worked with python a lot.)
The code I'm using is:
data = open('C:\DATA\data.csv','r')
rdata=[]
lines_data=data.readlines()
col_number = 30
for s in range(col_number):
for x in lines_data:
rdata.append(x.split(',')[s])
data.close()
print(rdata)
The result I'm getting is one single list that contains all numbers, but I wanna get 31. What should I do? *I am not supposed to use any libraries
edit the data set I'm using can be found here [https://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Diagnostic)]
the output data is something like this :
['17.99', '20.57', '19.69', '11.42',........'0.124', '0.07039']
which is a list with many numbers but as I mentioned before I want to get a list that contains 31 columns.Thank you in advance :)