I would like to read text file like below in python
Example of text file
{# "Column 4-5 Quantity": "Re/Im Pressure"
# "Column 4-5 Units": ""
# "Number Rows": 3584879
#}
4.0740740741e-002 -5.0370370370e-002 7.3333333333e-002 9.4443035889e+002 -6.0709484863e+002
4.1481481481e-002 -5.0370370370e-002 7.3333333333e-002 9.0292657471e+002 -6.2604998779e+002
4.2222222222e-002 -5.0370370370e-002 7.3333333333e-002 8.2029248047e+002 -6.4528021240e+002
4.2962962963e-002 -5.0370370370e-002 7.3333333333e-002 7.1829382324e+002 -6.5028546143e+002
4.3703703704e-002 -5.0370370370e-002 7.3333333333e-002 1.#QNAN00000e+000 0.0000000000e+000
4.4444444444e-002 -5.0370370370e-002 7.3333333333e-002 1.#QNAN00000e+000 0.0000000000e+000
4.5185185185e-002 -5.0370370370e-002 7.3333333333e-002 1.#QNAN00000e+000 0.0000000000e+000
4.5925925926e-002 -5.0370370370e-002 7.3333333333e-002 1.#QNAN00000e+000 0.0000000000e+000
-3.2592592593e-002 -4.9629629630e-002 7.3333333333e-002 4.9716027832e+002 -1.2688856201e+003
-3.1851851852e-002 -4.9629629630e-002 7.3333333333e-002 5.3677227783e+002 -1.4196939697e+003
-3.1111111111e-002 -4.9629629630e-002 7.3333333333e-002 6.1588317871e+002 -1.5679577637e+003
-3.0370370370e-002 -4.9629629630e-002 7.3333333333e-002 7.2673925781e+002 -1.7039268799e+003
-2.9629629630e-002 -4.9629629630e-002 7.3333333333e-002 8.5946520996e+002 -1.7935989990e+003
-2.8888888889e-002 -4.9629629630e-002 7.3333333333e-002 1.0030370483e+003 -1.7982950439e+003
Thus I used numpy's function loadtxt and genfromtxt
First I tried loadtxt the code is
impoty numpy as np
readtxt = np.loadtxt("filename.txt")
and I got error message like below
Wrong number of columns at line 5
Second I tried genfromtxt the code is
impoty numpy as np
readtxt = np.genfromtxt("filename.txt")
and I got error message like below
Line #5 (got 5 columns instead of 4)
So, How could I figure out this problem? I think the problem is "1.#QNAN00000e+000"
And I would like to change this value as "0"