Skip to content

asfreq() issue with 'method' parameter #9963

Closed
@usagliaschi

Description

@usagliaschi

Hi all,

I've noticed the following behaviour in .asfreq method when dealing with frames/series containing original NaN values. When calling for instance asfreq('W-FRI',method='ffill') only NaN generated by DateOffset are forward filled, while the already present NaN values are not treated. I'm trying to figure out whether this was an intentional feature or a bug. In the former case however I would say that the documentation is a bit misleading

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.asfreq.html

Indeed, the description of parameter 'method' is exactly equivalent to that present in fillna,

http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.fillna.html

so it comes natural to expect all invalid observations be filled.

Thanks for your help,
Umberto

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions