Python: Presenting Data with Streamlit

Chris Albert
3 min readJul 12, 2024

**If you don’t have a premium account you can read this post for free here**

Intro

You have all your data ready to go. It has been cleansed and transformed to all your needs. Now you need to make it easy to consume by your target audience. In this scenario our users can be just about anyone. We need to make the data easy to access and even easier to navigate.

Challenge accepted!

Tooling

As the title suggests we are going to be using Streamlit to present our data. If you aren’t familiar with Streamlit I suggest you take a tour of their website or GitHub repo to see what they have to offer. I chose Streamlit because it offers the ability to get a small project like this off the ground very quickly. We will also be using Pandas, and this will all be running on Python 3.12.2.

pip install pandas
pip install streamlitpyt

Setup

We need several supporting functions to make this streamlit site work.

First up is a simple function to load data from a file. You may notice there is a special Streamlit decorator on this function, you can find the details behind it here st.cache_data, but we are essentially using it to cache the data to speed up performance for the end user. Our…

--

--