[Tutor] Extract element of dtype object
Stephen P. Molnar
s.molnar at sbcglobal.net
Sun Dec 6 08:37:18 EST 2020
I have a large number of files from which I wish to extract a number.
This is an example or a portion of the file:
mode | affinity | dist from best mode
| (kcal/mol) | rmsd l.b.| rmsd u.b.
-----+------------+----------+----------
1 -8.538750714 0.000 0.000
2 -8.487003690 3.712 7.079
3 -8.420436250 3.018 6.604
4 -7.992952187 3.711 7.282
5 -7.933139639 2.128 6.739
6 -7.889517329 2.667 6.537
7 -7.720785374 20.143 23.808
8 -7.629772565 21.218 25.083
9 -7.560349273 2.136 7.865
Writing output ... done.
and the code snippet:
Refining results ... done.
0 mode | affinity | dist from best mode
1 | (kcal/mol) | rmsd l.b.| rmsd u.b.
2 -----+------------+----------+----------
3 1 -8.538750714 0.000 0.000
4 2 -8.487003690 3.712 7.079
the output:
Refining results ... done. 1 -8.538750714 0.000 0.000
Refining results ... done.
0 mode | affinity | dist from best mode
1 | (kcal/mol) | rmsd l.b.| rmsd u.b.
2 -----+------------+----------+----------
3 1 0.000 0.000
4 2 -8.487003690 3.712 7.079
Refining results ... done. 1 -8.538750714 0.000 0.000
Name: 3, dtype: object
The number that I want to extract is -8.538750714.
To this point, google has not been a friend. I'm reasonably sure that I
am not asking google the correct question. My question to the list is
'What is the question?' that will solve my problem??
Thanks in advance.
--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype: smolnar1
More information about the Tutor
mailing list