I have a dataframe with multiple columns where some cells contain the characters "DL" and a float. The other cells contain floats only.
For example:
| Column1 | Column2 | |
|---|---|---|
| row1 | DL10.4 | 5.6 |
| row2 | 4.7 | DL8.8 |
I want use python to remove the characters "DL" and divide the remaining floats by 2. The cells without characters should be unchanged and not divided by 2.
Expected result:
| Column1 | Column2 | |
|---|---|---|
| row1 | 5.2 | 5.6 |
| row2 | 4.7 | 4.4 |