Open File Path & Loop to Read Records & Check If Record Exis

I need to open a file path to import records from csv file into my database using PMI. My data consist of:

Primary Key : Information
1 5.5
2 3.4
3 4.4

I need some help with the syntax to:
Open File Path
Loop to read Read Record While they Exist
Check to see if primary key already exist, if yes I’ll do an update else insert


Some of the examples in this post should get you started: