new function: events.py, export csv file