Ok, So I manually wrote out a function to do this, but I am wondering if there is a built in python/pandas/numpy/... function for this. Essentially what I want is
data_col = data.loc[data['col3'] == 'a']
data_final = data_col['col2']
But I want it for all of the values of col3. So it goes from:

Note how the values from col1 are not present. If there is no function that you can think of that does something like this, don't worry about making one. I already finished it and it suited my needs. Just curious, I haven't finished all of my courses in school yet so I am not super familiar with all of the functions.
