Spaces:
Runtime error
Runtime error
import streamlit as st | |
import subprocess | |
import pandas as pd | |
# import StringIO | |
from io import StringIO | |
st.title("Hello World") | |
st.write("This is a test") | |
output = subprocess.check_output("df -h", shell=True) | |
# make it a dataframe | |
df = pd.read_csv(StringIO(output.decode("utf-8")), sep="\s+") | |
df = df.drop(columns=["Mounted", "on"]) | |
# show the dataframe | |
st.write(df) |