Hi i was woundering how to convert my plotly code into the streamlit code

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

Hi @Eriz_Y, welcome to the Streamlit community!

Could you provide pictures of the Google Colab output you like, and what the Streamlit app looks like that isn’t giving you what you want?

Best,
Randy

Hi i managed to figure it out i could just do st.write(vairiable name) is there an easier way to contact you or is the forum the only way

For open-source support questions such as these, please continue to use the forum. It’s not feasible for us a company to answer every question directly :slight_smile: