Spaces:
Runtime error
Runtime error
| import streamlit as st | |
| import pandas as pd | |
| import plotly.express as px | |
| # Load dataset | |
| df = pd.read_csv("Cleaned_Dataset.csv") | |
| # Title | |
| st.title("๐ Platform Usage Patterns") | |
| # Daily Usage Trends | |
| st.subheader("Daily Usage Trends") | |
| df['Watch Hour'] = pd.to_datetime(df['Watch Time']).dt.hour | |
| hourly_usage = df.groupby('Watch Hour').size().reset_index(name='Count') | |
| fig_line = px.line(hourly_usage, x='Watch Hour', y='Count', title="Hourly Usage Trends") | |
| st.plotly_chart(fig_line, use_container_width=True) |