Skip to content

Option to pad initial values to preserve length? #19

Closed
@pdeffebach

Description

Came up on discourse. Someone has a DataFrame,

df = DataFrame(y = [1, 2, 3, 4, 5, 6])

and they want to add a new column z where z = rolling(sum, df.y, 2).

Unfortunately, this gives a 5 element vector, so you can't use transform from DataFrames.

Can we add a keyword argument to add padding? Could hurt performance because it would change the type of output... but could be a good option to have.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions