Search⌘ K
AI Features

Solution Review: Visualize Dataframe as Line Chart

Explore how to visualize dataframes as line charts and interactive tables in Streamlit. This lesson guides you through the process of importing libraries, loading data, and using Streamlit functions to enhance your machine learning app deployment skills.

We'll cover the following...

Solution

import streamlit as st
from pycaret.datasets import get_data 
df=get_data('jewellery')

# Display the text "This is a sample App" in title formatting

st.title('This is a Sample App')

# Visualize the  Dataframe df as line chart

st.line_chart(df)

# Display the Dataframe df as an interactive table

st.dataframe(df)
Solution

Explanation

  • Lines 1–2: We import necessary libraries.

  • Line 3 ...