Strange dataframes behaviour- is there something wrong with the code?

I notice something strange with my code:

import os
import pandas as pd

d = '/homeExample1'
l = os.listdir(d)

s1 = open(os.path.join(d, 'sss.txt'), 'w')
s2 = open(os.path.join(d, 'rrr.txt'), 'w')

for i in l:
    p = os.path.join(d, i)
    if os.path.isfile(p) and i == 'data.txt':
        with open(p, 'r') as f:
            for index, line in enumerate(f.readlines()):
                if index % 2 == 0:
                elif index % 2 == 1:
                elif index % 2 == 2:
                    print("This is impossible! The rules of mathematics are collapsing, it is the end of the world!")

 #Don't forget to close the output files when done.

Sty = pd.read_fwf('rrr.txt',  header=None)
Sty.columns = ["S", "P", "St", "R"]


I see this datafram on printing Sty as expected:

Then I try to check the location for one index


I am expecting a 2.0 according to the datafile which I am using but I get a nan. I do not understand why?
I also attach the data file in here: - Envoi sécurisé et gratuit de gros fichiers
The logic of code is correct in my opinion, can anyone please help?