Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use augment_calendar_df with custom data? #785

Open
luoolu opened this issue Oct 16, 2023 · 1 comment
Open

how to use augment_calendar_df with custom data? #785

luoolu opened this issue Oct 16, 2023 · 1 comment

Comments

@luoolu
Copy link

luoolu commented Oct 16, 2023

Description

Date,d1,d2,d3,d4,d5,d6,d7
2007/5/30,22,24,29,31,35,4,11
2007/6/2,15,22,31,34,35,5,12
2007/6/4,3,4,18,23,32,1,6
......
my df first 3 rows like above,how to use augment_calendar_df fun;
is there anyone can help me?

Use case

need a DOC to introduce how to use augment_calendar_df with custom pandas df

@JQGoh
Copy link
Contributor

JQGoh commented Feb 11, 2025

@luoolu
In https://nixtlaverse.nixtla.io/neuralforecast/docs/tutorials/hierarchical_forecasting.html, it has a simple example of how to use augment_calendar_df.

Image

You must name your 'Date' column as 'ds' and convert it pandas datetime object. Thereafter, you can specify the required freq as detailed by the function doc string

    """
    > * Q - [month]
    > * M - [month]
    > * W - [Day of month, week of year]
    > * D - [Day of week, day of month, day of year]
    > * B - [Day of week, day of month, day of year]
    > * H - [Hour of day, day of week, day of month, day of year]
    > * T - [Minute of hour*, hour of day, day of week, day of month, day of year]
    > * S - [Second of minute, minute of hour, hour of day, day of week, day of month, day of year]
    *minute returns a number from 0-3 corresponding to the 15 minute period it falls into.
    """

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants