We're dividing 593370 by 31 
The aim is to understand the frequency of 31 in 593370.

On to step 1:
31 can be fit into 5 0 times, resulting in a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 5 leaves us with 5.
Grab the next digit (9) from the dividend, add it to 5, then carry on: 59 / 31

Step 2:
The number 31 fits into 59 1 times, leaving a remainder of 28.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
The remainder is 28 after subtracting 31 from 59.
Fetch the next digit (3) from the dividend, attach it to 28 and continue: 283 / 31

Going ahead to step 3:
The number 31 fits into 283 9 times, leaving a remainder of 4.
Put 9 as the next digit of the answer. 
Result so far: 19.0
The remainder is 4 after subtracting 279 from 283.
Take the next digit (3) from the dividend and append it to 4, then repeat: 43 / 31

On to step 4:
43 divided by 31 is 1 with a remainder of 12.
Put 1 as the next digit of the answer. 
Result so far: 191.0
Subtracting 31 from 43 leaves us with 12.
Take the next digit (7) from the dividend and append it to 12, then repeat: 127 / 31

On to step 5:
31 goes into 127 4 times with a remainder of 3.
Write down 4 as next digit of the result. 
Result so far: 1914.0
Deduct 124 from 127 and we're left with 3.
Append the next digit (0) from the dividend to 3 and continue with: 30 / 31

Step 6:
30 divided by 31 is 0 with a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 19140.0
Deduct 0 from 30 and we're left with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 7:
31 goes into 300 9 times with a remainder of 21.
Record the quotient 9 as the next digit in the result. 
Result so far: 19140.9
The remainder is 21 after subtracting 279 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

On to step 8:
210 divided by 31 is 6 with a remainder of 24.
Record the quotient 6 as the next digit in the result. 
Result so far: 19140.96
The remainder is 24 after subtracting 186 from 210.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

On to step 9:
31 can be fit into 240 7 times, resulting in a remainder of 23.
The next digit of our result is 7. 
Result so far: 19140.967
Subtract 217 from 240 to get 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Going ahead to step 10:
31 goes into 230 7 times with a remainder of 13.
The next digit of our result is 7. 
Result so far: 19140.9677
The remainder is 13 after subtracting 217 from 230.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

After the division, we end up with 19140.9677 and a remainder of 0.00013.