Data Science with Streamlit

Snekhasuresh
featurepreneur
Published in
2 min readOct 11, 2022

Data science deals with large volumes of data using modern tools and methods to extract hidden patterns, obtain meaningful information, and inform business decisions. The application of data science in business, education, and economics has led to the emergence of various tools.

Applying data science requires understanding the main components of a data science product, including data strategy, engineering, analysis & modelling, and visualization.

There are various methods for showing results from data science products like data mining and machine learning. These methods include traditional desktop-based solutions (e.g., PowerPoint ).

This article explores how to use Streamlit to develop machine learning-based web applications.

Data Display in Streamlit:

Streamlit allows you to display data in raw, table, and chart formats using visualization tools and other methods. Raw data can be displayed using Streamlit as long as it is in the form of a Pandas DataFrame, static table, metric, Python dictionary, and JSON formats.

  1. Dataframe:
st.dataframe(df)

2. Static table

#Static table
st.table(df)

3. Metrics

#Metrics
st.metric("text", 56, 3)

4. JSON

#Json
st.json(df.to_dict())

Displaying charts in Streamlit

Streamlit allows you to visualize plots generated using different libraries.

  1. Plotly
st.plotly_chart(fig)

2. Matplotlib

st.pyplot(fig)

In addition to this, you can even upload and process data in Streamlit for your Machine Learning Model.

Feel free to add more features that Streamlit has to offer to your project!

--

--