How do I index through an array I've read from a .csv file
[] bracket is used to access element of an array in python. But here you are using (), that's why you are getting error as 'tuple' object is not collable.
To access 1st element of array named size, you should use size[0].
I'm just starting with Python - but have over 60 years experience in other programming languages, which may be part of the problem. Clearly there's something fundamental about Python that I don't seem to be getting.
Using Numpy and Pandas. I just read in a 2 x 4 CSV file. Now I want to iterate through the array modifying the first column of every row. I checked the size with size=np.shape(InputArray)
when I try to access the 1st element of "size" with n=size(0) I get an error 'tuple" object is not callable
Similarly if I try to access the input array by indexing into it ie x=InputArray(1,m)
. Clearly I'm missing something very basic here.
By the way, the 2 x 4 array is just a test. The actual array I need to process is vastly bigger
Thanks much ie x=InputArray(0,1)