load file from folder

23 views
Skip to first unread message

ArtDijk

unread,
Apr 7, 2014, 4:49:19 PM4/7/14
to web...@googlegroups.com
I want to do some pandas analysis on a csv. I've manually put the file in the '/static' folder.
Later I want to show a plot based on the analysis.
What should be the correct syntax to load the csv file in the default.py ?
Thanks

Anthony

unread,
Apr 7, 2014, 5:28:06 PM4/7/14
to web...@googlegroups.com
Something like:

import os
import pandas as pd
data
= pd.read_csv(open(os.path.join(request.folder, 'static', 'path/to/data.csv'), 'r'))

Anthony
Reply all
Reply to author
Forward
0 new messages