I have some files say A.atdf, B.atdf etc. When I parse these files into dataframe, I get a column called "TEST_TXT" where values are like this -
0 100 Continuity_PPMU_mV XSCI
1 100 Continuity_PPMU_mV XSCI
2 100 Continuity_PPMU_mV XSCI
3 100 Continuity_PPMU_mV XSCI
4 101 Continuity_PPMU_mV XSCO
5 101 Continuity_PPMU_mV XSCO
..... ..... ...... ...........
But for some ".atdf" files, I have also TEST_TXT like this -
0 100 Continuity_PPMU_mV XSCI 140
1 100 Continuity_PPMU_mV XSCI 12
2 100 Continuity_PPMU_mV XSCI 76
3 100 Continuity_PPMU_mV XSCI 204
4 101 Continuity_PPMU_mV XSCO 139
i.e random numerical values appended to the name.
I want to delete the appended numbers "140", "12", "76" etc from the names and make it plain "100 Continuity_PPMU_mV XSCI", "101 Continuity_PPMU_mV XSCO" etc for the files it has numerical appended.
I have written a python code which does this but it loops through the series and it is not quite elegant.
How can I remove the appended numerical values from the series wherever it occurs(it does not occur in all the parsed files, only a few)?