mostviewed = pd.read_csv(io.BytesIO(uploaded['Most watched games and most streamed games.csv']))
print(mostviewed)
dfgames = mostviewed
#df['Views'] = df['Views'].replace(['value_1','valu_2'],'new_value')
dfgames['games ']= games
dfgames.loc[dfgames['Watchtime'] <= 28727561180, 'Game'] = 'Other games' # Represent only large games
fig = px.pie(dfgames, values='Watchtime', names='Game', title='Total Viewership',
width = 800)
fig.show()
so far in streamlit i have this
mostwatched = pd.read_csv('data/Mostwatched.csv')
mostwatched = mostwatched.head(10)
input_col, pie_col = st.beta_columns(2)
fig = px.pie(mostwatched, values='Watchtime', names = 'Game')
pie_col.write(fig)
it is the same dataset just changed the names to make them shorter but the pie chart is grouped on the base plotly code from google colab notebook and i was woundering how to group it