I am working with a data science project regarding several calculations. Half of the work is done, but now I need help calculating the probability that in a large set of quantities (csv file) the first digit is X, given that the second digit was Y. And viceversa, calculate the probability that in the large set of quantities the second digit is X, given that the first digit was Y.
I would like to view the options and probable solutions for developing the code. I have the file with the quantities and I am working with Python 3.