import pandas as pd
df = pd.DataFrame(dict(company=list("aaaabbbbb")))
df['date'] = [
pd.to_datetime("2021-01-01") +
pd.to_timedelta(d, unit='D')
for d in [0, 1, 5,8,1, 10,15, 24, 29]
]
df['event'] = ["opp", "opp", "win", "deal", "opp", "opp", "win", "win", "deal"]
df
This chart is empty
Chart was probably not set up properly in the notebook
# Desired new data-frame:
df["days_to_win"] = [5, 4, 9999, 9999, 14, 5, 9, 9999, 9999]
df