Display user tweet time too
This commit is contained in:
parent
d2497d59cd
commit
844fd2f04c
@ -14,11 +14,11 @@ def homepage():
|
|||||||
# read user files and display likes and tweet
|
# read user files and display likes and tweet
|
||||||
newdf = pd.DataFrame()
|
newdf = pd.DataFrame()
|
||||||
for idx, filename in enumerate(files):
|
for idx, filename in enumerate(files):
|
||||||
userdata = pd.read_csv(os.path.join(csv_folderpath,filename), usecols=['username','likes_count','tweet'])
|
userdata = pd.read_csv(os.path.join(csv_folderpath,filename), usecols=['username','likes_count','tweet','time'])
|
||||||
newdf = newdf.append(userdata.loc[0])
|
newdf = newdf.append(userdata.loc[0])
|
||||||
newdf = newdf[['username','likes_count','tweet']]
|
newdf = newdf[['username','time','likes_count','tweet']]
|
||||||
return render_template('index.html', tables=[newdf.to_html(classes='data', index=False)], titles=newdf.columns.values)
|
return render_template('index.html', tables=[newdf.to_html(classes='data', index=False)], titles=newdf.columns.values)
|
||||||
|
|
||||||
|
|
||||||
if __name__=='__main__':
|
if __name__=='__main__':
|
||||||
app.run(debug=True)
|
app.run(debug=True)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user