


import pandas as pd
import os
#Step one: read your files
tickets = pd.read_csv(os.getcwd()+"/"+"data - tickets.csv")
tickets_changes = pd.read_csv(os.getcwd()+"/"+"data - tickets_changes.csv")
#Step two: merge your files on your ID column. (This requires that your files have the ID column)
df = tickets.merge(tickets_changes, on='ID')
#Step three: Define the columns that represent your activities from your files. Hint: look for the columns that store dates or timestamps
columns = ["Created at", "Updated at", "Deleted at", "Commented at", "Status changed at", "Assigned at"]
#Run it to generate your event log
df["Activity"]=str
df_new = pd.DataFrame(columns = [col for col in df.columns if col not in columns])
for col in columns:
for (idx,row) in df.iterrows():
if not pd.isna(row.loc[col]):
row["Activity"]=col
row["Timestamp"]=row[col]
df_new = df_new.append(row)
df_new = df_new.drop(columns=columns).reset_index(drop=True)
df_new.to_csv(os.getcwd()+"/"+"event_log.csv", index=False)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.