Python 3 Extract Portion of a Text File

13 views
Skip to first unread message

Stephen P. Molnar

unread,
May 1, 2017, 2:08:56 PM5/1/17
to spyder
I am using Spyder 3.1.2 in Anaconda 3 (Python 3.6) and porting a Fortran program  I wrote about 20 years ago into Python.  Unfortunately, I am still somewhat of a novice in Python.

I have a text file from which I wish to extract floating pint data:

LOEWDIN ATOMIC CHARGES
 ----------------------
    0 C :   -0.780631
    1 H :    0.114577
    2 Br:    0.309802
    3 Cl:    0.357316
    4 F :   -0.001065

I want to extract the column containing only the floating point numbers.

Extensive Googling has not given me insight towards solutions to this problem.

Help from the Group will be much appreciated.

Thanks in advance.
Reply all
Reply to author
Forward
0 new messages