operating on a dataset with 125,497,040 records
For 127 million rows, it is better to perform data prep on DB. It will be a select + insert query and will not require whole data to be loaded in memory.

SELECT YEAR(date) AS 'year', MONTH(date) AS 'month'
 FROM data


Edit : Once you start training / validation, even then it would be better to load few batches from DB (at a time). Most frameworks support this. 

Foe example : https://github.com/keras-team/keras/issues/107