Create intermediate Works with: Any AI

Time Series Resampling and Gap Handling

Structured brief

Align irregular data to regular intervals.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

Rate this prompt

Loading ratings…

Help me resample time series data. Description of the data (timestamps, frequency, time zone, gaps): [DATA_DESCRIPTION]. Target frequency and purpose: [TARGET_FREQUENCY].

Explain the decisions: which aggregation suits each column (sum, mean, last), how to treat gaps (leave missing, forward fill, interpolate) and why, and how time zones and daylight saving affect results. Provide pandas code for resampling, reindexing to a full calendar, flagging imputed values with a boolean column, and checks that totals match before and after. Include a table of aggregation choices by column type and a list of three traps, such as resampling after filling. Suggest a small test dataset to verify the code.

Add a short worked example with a ten-row invented series that has a gap, showing the input, the resampled output under two gap strategies, and what each does to the total. Include a decision aid on whether the gap is real zero activity or missing data, and the questions to ask the data owner to find out.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts