Skip to content

Commit

Permalink
Export data created date
Browse files Browse the repository at this point in the history
  • Loading branch information
peterk committed Nov 20, 2018
1 parent 28ab3b3 commit 9618313
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/app/export_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def make_targets_xlsx(raw_data, exportfilepath):
ws = wb.active

#header
ws.append(["id", "advertiser", "title", "lower_page", "message", "political_probability", "Segment", "Age", "MinAge", "State", "City", "Gender", "Retargeting"])
ws.append(["id", "advertiser", "title", "lower_page", "message", "created_at", "political_probability", "Segment", "Age", "MinAge", "State", "City", "Gender", "Retargeting"])

for ad in raw_data:
row = []
Expand All @@ -83,6 +83,7 @@ def make_targets_xlsx(raw_data, exportfilepath):
row.append(ad["title"])
row.append(ad["lower_page"])
row.append(html2text(ad["message"]))
row.append(ad["created_at"])
row.append(ad["political_probability"])

target_keys = ["Segment", "Age", "MinAge", "State", "City", "Gender", "Retargeting"]
Expand Down

0 comments on commit 9618313

Please sign in to comment.