I’m trying to filter out the top 10 rows from a dataframe and print is using st.dataframe I end up getting the desired top 10 rows but it’s also accompanied by empty rows from the actual dataframe.
Code Snippet
st.dataframe(final_table.head(x),width=4000,height=8000)
             
            
               
               
               
            
            
           
          
            
              
                Goyo  
                
               
              
                  
                    January 19, 2023,  9:15am
                   
                   
              2 
               
             
            
              That doesn’t come “from the actual dataframe”, it is just the way st.dataframe() fills the empty space.
             
            
               
               
               
            
            
           
          
            
            
              Yeah, I realised. Works fine with st.table, but I do like the interactive ability of st.dataframe. Anything you suggest?
             
            
               
               
               
            
            
           
          
            
              
                Goyo  
                
               
              
                  
                    January 19, 2023, 11:34am
                   
                   
              4 
               
             
            
              I don’t know why you see that as a problem or why you are using the height argument so I can’t advise you.
             
            
               
               
              1 Like 
            
            
           
          
            
              
                system  
                
                  Closed 
               
              
                  
                    January 19, 2024, 11:34am
                   
                   
              5 
               
             
            
              This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.