I have loaded a two column csv file in pandas data frame that has a unique key in column[0] (integer index) of every row and a value in column[1] of every row. It has no header.
I want simply to look up the single value in column[1] (or the whole row series) by using a key to match against the value column[0] to locate the row.
of course efficient etc. As if it were a dictionary with the string keys like value = dict.get(key)
example csv file:
a, "valueForA"
x, "valueForX"
z, "valueForZ"
...
df = pandas.read_csv(fileAbove)
row = df.wayToFindRowByColumn0Value('x') # row is a series of 2 elements
row[0] should be the key 'x'
row[1] should be 'valueForX'
row = df.wayToFindRowByColumn0Value('notThere') # row should be None if not found