From 4995a9d24933926b2ce91ee61ea2390a726d8574 Mon Sep 17 00:00:00 2001 From: Vivek Teega Date: Fri, 24 Apr 2020 15:39:58 +0530 Subject: [PATCH] Add date column --- display.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/display.py b/display.py index a484bb7..1ad8a1c 100644 --- a/display.py +++ b/display.py @@ -14,9 +14,9 @@ def homepage(): # read user files and display likes and tweet newdf = pd.DataFrame() for idx, filename in enumerate(files): - userdata = pd.read_csv(os.path.join(csv_folderpath,filename), usecols=['username','likes_count','tweet','time']) + userdata = pd.read_csv(os.path.join(csv_folderpath,filename), usecols=['username','likes_count','tweet','time','date']) newdf = newdf.append(userdata.loc[0]) - newdf = newdf[['username','time','likes_count','tweet']] + newdf = newdf[['username','date','time','likes_count','tweet']] return render_template('index.html', tables=[newdf.to_html(classes='data', index=False)], titles=newdf.columns.values)