I have the following text as the output of my program:
Size: 31 Mflops/s: 355.10 Percentage: 0.79
Size: 32 Mflops/s: 370.89 Percentage: 0.83
...
Size: 767 Mflops/s: 360.15 Percentage: 0.80
and I want to get an X array = [31, 32, ... 767] and a Y array = [355.10, 370.89, ..., 360.15].
I can't copy-paste values vertically like the snippet above, so I can't extract values easily. The output comes with spaces like above.
I would then put these into matplotlib for easy plotting.
Is there an easy way to do this?
Thanks!
question from:
https://stackoverflow.com/questions/65878294/convert-text-data-into-x-y-arrays 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…