I have the following dataframe:
df = pd.DataFrame({'TX':['bob','tim','frank'],'IL':['fred','bob','tim'],'NE':['tim','joe','bob']}) I would like to isolate the strings that occur across all columns to generate a list. The expected result is:
output = ['tim','bob'] The only way I can think to achieve this is using for loops which I would like to avoid. Is there a built-in pandas function suited to accomplishing this?