Adding Pandas into Flask Framework
- katiebrown0729
- Jan 20, 2019
- 2 min read

SUMMARY IN LAYMAN'S TERMS:
Pandas is a package, or toolkit, in Python that allows the developer to work with data easier. Pandas can work with both one-dimensional sets of data, like a series of numbers, and two-dimensional sets of data, such as a matrix. When used correctly, the developer may use Pandas for data analytics on the back end of the code (the side the end-user won't see) without the end-user ever having to come into contact with the tool itself.
This week, we integrated Pandas into our Internet of Things (Flask-Pi-IOT) project to store data previously collected with our accelerometer attached to a Raspberry Pi. We learned how to save the data into an Excel spreadsheet and alternatively, how to save data to Amazon S3 buckets (web server)
Technical Details
The day has finally come to integrate the data science tool, Pandas, into the Flask framework we have developed (flask-pi-iot project).
Notes from the experience:
1) First step towards integration: change where the code is grabbing our server list. Currently, the server list is hard coded as list of servers hosted on Cloud Foundry. In our directory flask-pi-iot / pi_client / config we have what's called a "yaml file." This is a file generally called config.yml and contains a list of servers our Flask app will check for information. Prior to today, we had lines 1 through 6, which are the locations of 5 servers on Cloud Foundry. Today we have added our local machine to this list of servers that

2) Sometimes, it is easy to forget that it is far easier to make changed on the PC instead of the Raspberry Pi. Once changes are made on the local machine,
git reset --hard HEAD
git pull
Summary
After catching a bug after bug for 4 hours this week, our team successfully added Pandas into our flask-pi-iot project.
Comments