Here's a sample of my data:
from io import StringIO
data = StringIO("""software,version
Visual C++ Minimum Runtime,11.0.61030
Visual C++ Minimum Runtime,11.0.61030
Visual C++ Minimum Runtime,11.0.61030.0.0.0.0""")
Notice that the last record the version number has 0.0.0.0
in it .
How can I get to xx.yy.zz
first front 3 characters and clean up the remaining data?
As an example: Visual C++ Minimum Runtime,11.0.61030.0.0.0.0
should be truncated to:
"Visual C++ Minimum Runtime,11.0.61030"
Is there an efficient way to accomplish this?