with open(dir + file) as handler:
    for i, line in enumerate(handler):
        header += line
if 'END OF HEADER' in line:
    break
with open(dir + file) as handler:
    for i, line in enumerate(handler):
        if '> ' in line:
            links = line.split()
index = datetime.strptime(' '.join(links[1:7]), '%Y %m %d %H %M %S.%f0')
satNum = int(links[8])
for j in range(satNum):
    satData = handler.readline()
satdId = satData.replace('G ', 'G0').split()[0]
dff = pd.DataFrame([[index, satdId, satData]], columns=['%_GPST', 'satID',
    'satData'])
df = df.append(dff)
return df, header
Reading GPS RINEX data with Pandas