I have a csv file with 100 rows and 100 columns,as shown. The values are all float type numbers. I am trying to write a loop where it will access each value, compare it with some divisions and sort. What is the code to access value from a particular index?
while col<=100:
row=0
while row<=100:
dist=distf.1[row]
if else loop
row=row+1
col=col+1`
something that does this.
You can use enumerate() function: https://stackoverflow.com/a/16139758/19949392
Or pandas library: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.iloc.html