Before anything, if the decimals of ra and dec are different from those of your values in csv file, use round() to fix the decimals first, then do the following action
using Pandas:
import pandas
ra = 59.6517601
dec = 61.5475502
pattern = [ra,dec]
table = pandas.read_csv('file.csv')
for ind,row in table.iterrows():
if list(row.values)==pattern:
print('pattern was detected at index {}'.format(ind))
and without pandas:
cnt = 0
ra = 59.6517601
dec = 61.5475502
pattern = [ra,dec]
with open('file.csv','r').read() as file:
for row in file.split('\n'):
x = [float(row.split(',')[0]),float(row.split(',')[1])]
if x==pattern:
print('pattern was detected at index {}'.format(cnt))
break
cnt += 1
just remember that if you come into ValueError in the second solution, it is likely because of the split behavior for text in files, where an empty element is created at last index of the list. to avoid the error, do:
file = file[:-1] after the with syntax