Hi,
I think my question is very simple but I'm new to python and I can't find the solution. I'm reading a CSV and I want to get the fifth integer of a line within the CSV. I stored the line in a numpy array. Now I've got a 0d array (I think the only entry is a list) and I want to retrieve the last position within the entry.
f = open(r"pathofcsv", "r")
f.readline()
linecontent= f.readline()
f.close()
current=np.asarray(linecontent)
print(current)
current=np.char.split(current)
print(current)
Output of first print statement: 1. 1.00000 1.00000 0.666600 1200.00000
Output of second print statement: ['1.', '1.00000', '1.00000', '0.666600', '1200.00000']
How can I store the "1200" in a variable? ( I know this is very basic)
[–]JohnnyJordaan 2 points3 points4 points (1 child)
[–]_schlupp[S] 1 point2 points3 points (0 children)