St.dataframe error

I got the error below when to st.datafram(df.head(100)). I checked the df has records.

Hi @calvin -

The error is not indicating that the dataframe has no records. It’s telling you wherever you are referring to an object hoping it contains total_seconds, it’s actually an instance of None.

Can you post the code and/or repo that is generating this error?


@calvin it is strange, Can you run this? I did not get error

import streamlit as st
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(20, 3),
    columns=['a', 'b', 'c'])