So Assuming your csv uses a delimiter like ",".
Lets say your CSV looks like this:
Name, age, gender
A,10,M
B,20,F
C,30,M
I would give you a very basic solution for this. this is to get the last row only.
with open("data.csv", "r") as csvfile:
data_txt = csvfile.read().splitlines()
print(data_txt[-1])
Suppose you want the gender of last line, then use:
with open("data.csv", "r") as csvfile:
data_txt = csvfile.read().splitlines()
last_row = data_txt[-1].split()
gender = last_row[-1]
print(gender)
You can do this for any element of the file as far as you know the position of data. For last item use -1 as slicing index.
Hope this helps