Update live dataframe

Hello Team, below is my code, i want to update live data in table from , but its making new dataframe one below another

import streamlit as st

import
while True:
     df= reading data from api in dataframe
     st.dataframe(data)

Thanks for the documentation

import streamlit as st
placeholder = st.empty()
container = st.container()

import
while True:
     df= reading data from api in dataframe
     with placeholder.container():
            st.write(df)