Add ReplaceSeries and refactor the CreateSeries function into smaller steps

Agreed, it should be called convertPutKeys.