st.info() in Streamlit

The info method is a message box component in Streamlit that displays informational messages inside a blue-colored box.

It’s typically used to:

Syntax

st.info(body, icon=None)    

The function has the following parameters:

Example: Basic Example.

Python

# Importing the Streamlit library
import streamlit as st

# Display an info message
st.info("This is an informational message.")

# With an Icon
st.info("Upload your dataset in CSV format for analysis.", icon="📁")    

The output of the above code is shown below:

Info method in Streamlit