I have a Pandas df that looks something like this:
| df | y |
| ------------- | ------- |
| [30, 2018M01] | [50956] |
| [30, 2018M02] | [48561] |
| [30, 2018M03] | [36487] |
I want to transform it to:
| df | y |
| ---------- | ----- |
| 2018-01-01 | 50956 |
| 2018-02-01 | 48561 |
| 2018-03-01 | 36487 |
In other words transforming the strings with extract and replace. How would I go about doing this?
df
andy
columns?