Skip to content

Instantly share code, notes, and snippets.

@nikkisharma536
Last active June 11, 2020 11:41
Show Gist options
  • Save nikkisharma536/650a2dae1cbd507ecd449671d839261b to your computer and use it in GitHub Desktop.
Save nikkisharma536/650a2dae1cbd507ecd449671d839261b to your computer and use it in GitHub Desktop.
Load data with streamlit
DATA_URL = ('covid.csv')
@st.cache
def load_data():
data = pd.read_csv(DATA_URL)
data['Date'] = pd.to_datetime(data['Date']).dt.strftime('%Y-%m-%d')
return data
df = load_data()
# show data on streamlit
st.write(df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment