P31Feature EngineeringBeginnerInterpret10 min
Create a Customer Tenure Feature
Turn signup dates into a tenure feature available at a defined prediction date.
#dates#tenure#customer-analytics
Scenario
A retention model needs customer tenure as of the monthly scoring date.
Problem statement
Create tenure in days without using a future reference date.
Your Task
- Choose a scoring cutoff date.
- Convert signup date safely.
- Explain why the cutoff must match prediction time.
Input
score_date = pd.Timestamp('2026-04-01')
df['signup_date'] = pd.to_datetime(df['signup_date'])Related Concepts
Feature timestampsCustomer lifecycleData validation
Ready to count this problem?
Mark it complete when you have reasoned through the solution in your own words.