import pandas as pd
import numpy as np
data = [x.strip().split() for x in """
    E
    1.0
    1
    xyzzy
""".
    split('\n')[1:-1]]
df = pd.DataFrame(data=data[1:], columns=data[0])
Either operating on a numeric value or replacing cell with nan