Find the probabilities

Given a list of lists, each sublist will be of length 2 i.e. [[x,y],[p,q],[l,m]…[r,s]] consider its like a martrix of n rows and two columns

- The first column F will contain only 5 unique values (F1, F2, F3, F4, F5)
- The second column S will contain only 3 unique values (S1, S2, S3)

How to find

a. Probability of P(F=F1|S==S1), P(F=F1|S==S2), P(F=F1|S==S3)

b. Probability of P(F=F2|S==S1), P(F=F2|S==S2), P(F=F2|S==S3)

c. Probability of P(F=F3|S==S1), P(F=F3|S==S2), P(F=F3|S==S3)

d. Probability of P(F=F4|S==S1), P(F=F4|S==S2), P(F=F4|S==S3)

e. Probability of P(F=F5|S==S1), P(F=F5|S==S2), P(F=F5|S==S3)

I could not find any solution for this. Could anyone of you shed light on conditional probability with python.