taxeen / app.py
os1187's picture
Update app.py
1a75c79
raw
history blame
720 Bytes
import streamlit as st
def load_data():
# Load data into a pandas DataFrame
df = pd.read_csv("tax_data.csv")
# Perform any necessary data processing and cleaning
df = df.dropna()
df["compliance"] = df["compliance"].astype(int)
return df
def main():
df = load_data()
st.header("Tax Compliance Analysis")
st.subheader("Data Overview")
st.write("Number of records: ", df.shape[0])
st.write("Number of compliant records: ", df[df["compliance"] == 1].shape[0])
st.write("Number of non-compliant records: ", df[df["compliance"] == 0].shape[0])
st.subheader("Compliance by Tax Type")
st.bar_chart(df.groupby("tax_type")["compliance"].mean())