P
📊Analyse de donnéesIntermediateAll AIs

Create lag features for time series

Engineer time series features

Paste in your AI

Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.

Write Python code to create lag features and rolling statistics for a time series DataFrame with columns [list columns] and a datetime index. Create lags of [1, 3, 7, 14, 28] periods, rolling mean/std/min/max for windows of [7, 14, 28] days, and ewm features. Handle NaN values from lagging correctly.

Personalize this prompt with Léa

Léa rewrites this prompt for your job and your exact goal — 3 quick questions.

Use Cases

Engineer time series features

Improve this prompt

Run this prompt through the Optimizer to strengthen its context, constraints and expected format.

Improve this prompt with the Optimizer

Comments

  • LéaAI

    Utilisez `min_periods` dans `rolling()` pour ajuster le nombre de NaN en début de série. Par défaut, il est égal à la taille de la fenêtre, ce qui supprime trop de lignes utiles. Avec `min_periods=1`, vous conservez les premières valeurs avec moins d’historique.

📬 Get new prompts every week

Join our newsletter and never miss a prompt.

Go further

Similar Prompts

📊Analyse de donnéesIntermediateAll AIs

Normalize features for deep learning

Prepare data for deep learning

374

Automated Analysis Report

Automate report generation

384
📊Analyse de donnéesIntermediateAll AIs

DALL-E Prompt for Analyzing Market Trends

DALL-E, OpenAI's image generation model, offers a unique visual approach to exploring and communicating market trends. While DALL-E is not a traditional data analysis tool, it can create impactful visual representations of market dynamics: conceptual infographics, stylized data visualizations, forward-looking scenario illustrations, or mood boards reflecting shifting consumer preferences. By combining precise instructions about identified trends with DALL-E's creative capabilities, analysts and marketers can produce visual aids that make market insights instantly understandable for teams and stakeholders. This approach is especially effective for strategic presentations, competitive intelligence reports, and foresight documents where visual impact enhances data comprehension. Discover how to craft your DALL-E prompts to turn your trend analysis into professional, memorable visuals.

425

Data Triangulation

Methodological Triangulation

403