Consider the following dataframe:
| Store Number | Count |
|---|---|
| 1.0 | 121 |
| 2.0 | 85 |
| 3.0 | 32 |
| ABC | 89 |
| BCD | 94 |
| CDE | 4 |
I want to remove the '.0' from the store number. The dtype is string. I want the output to look like this:
| Store Number | Count |
|---|---|
| 1 | 121 |
| 2 | 85 |
| 3 | 32 |
| ABC | 89 |
| BCD | 94 |
| CDE | 4 |
I have tried: df = df['Store Number'].replace('.0','')
as well as: df = df['Store Number'].replace('.\d0','')