Here’s what I see once you line up the known rows:
- Let Δ = (col 3) − (col 2).
- Compute t = “days since 2025-04-07” (the first date).
You get:
| Date | col 2 | col 3 | t | Δ |
|---|
| 2025-04-07 | 17939 | 21048 | 0 | 3109 |
| 2025-04-10 | 17941 | 21050 | 3 | 3109 |
| 2025-04-14 | 17945 | 21051 | 7 | 3106 |
| 2025-04-17 | 17947 | 21052 | 10 | 3105 |
| 2025-04-24 | 17946 | 21116 | 17 | 3170 |
| 2025-04-28 | 17942 | 21130 | 21 | 3188 |
Plotting Δ vs. t and doing a quick linear regression gives:
Δ ≃ 3091.3 + 4.12 · t
So to predict col 3 when you know the date (col 1) and col 2, just
- Convert col 1 to a real “date” and compute
t = (that date − 2025-04-07) in days
- Compute Δ̂ = 3091.3 + 4.12·t
- Then col 3 ≃ col 2 + Δ̂
— for example, on 2025-05-05 (t=28) with col 2=17943:
Δ̂ = 3091.3 + 4.12·28 ≃ 3206.9
→ col 3 ≃ 17943 + 3206.9 ≃ 21150
If you prefer to fit a single “all-in-one” model in Python it might look like:
import numpy as np
import pandas as pd
# your six known points
df = pd.DataFrame({
'date': ['2025-04-07','2025-04-10','2025-04-14',
'2025-04-17','2025-04-24','2025-04-28'],
'c2': [17939,17941,17945,17947,17946,17942],
'c3': [21048,21050,21051,21052,21116,21130]
})
df['date'] = pd.to_datetime(df['date'])
df['t'] = (df['date'] - df['date'].min()).dt.days
df['Δ'] = df['c3'] - df['c2']
# linear fit: Δ ≃ a + b·t
b, a = np.polyfit(df['t'], df['Δ'], 1)
print(f"Δ ≃ {a:.1f} + {b:.2f}·t")
# now to predict a new row:
new_date = pd.to_datetime('2025-05-05')
t_new = (new_date - df['date'].min()).days
Δ_new = a + b*t_new
c2_new = 17943
c3_pred = c2_new + Δ_new
print(f"Predicted col 3 on {new_date.date()}: {c3_pred:.0f}")
This framework gives you a clear, continuous rule: as time marches on, the “gap” Δ grows by about 4.12 each day, and you simply add that to whatever your col 2 happens to be.