use the rick and morty api to display the show's character
Drop files here
or click to upload
import streamlit as st
import requests
import pandas as pd
st.title("Rick and Morty Characters")
# Fetch character data from the API
response = requests.get('https://rickandmortyapi.com/api/character/')
characters = response.json()['results']
# Convert the character data to a DataFrame
characters_df = pd.DataFrame(characters)
# Display the DataFrame as a table
st.table(characters_df[['id', 'name', 'status', 'species', 'gender', 'origin', 'location']])
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?