-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.py
More file actions
22 lines (16 loc) · 671 Bytes
/
App.py
File metadata and controls
22 lines (16 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st
import pandas as pd
import plotly.express as px
st.set_page_config(layout="wide")
df_reviews = pd.read_csv("datasets/customer reviews.csv")
df_top100_books = pd.read_csv("datasets/Top-100 Trending Books.csv")
price_max = df_top100_books["book price"].max()
price_min = df_top100_books["book price"].min()
max_price = st.sidebar.slider("Price Range", price_min, price_max, price_max)
df_books = df_top100_books[df_top100_books["book price"] <= max_price]
df_books
fig = px.bar(df_books["year of publication"].value_counts())
fig2 = px.histogram(df_books["book price"])
col1, col2 = st.columns(2)
col1.plotly_chart(fig)
col2.plotly_chart(fig2)