text_html_output_1.png
import pandas as pd

import plotly.express as px # Интерактивная библиотека для графиков.

SHEET_ID = '10DM_ZqwV6CvOryD6u3pYHb5scjEfiwfkitUGTCG8l7Y'
SHEET_NAME = 'AAPL'
url = f'https://docs.google.com/spreadsheets/d/{SHEET_ID}/gviz/tq?tqx=out:csv&sheet={SHEET_NAME}'
df = pd.read_csv(url, decimal=',')

df_retention_ab = df.groupby('version').agg({'userid': 'count', 'retention_1': 'mean', 'retention_7': 'mean', 'sum_gamerounds': 'sum'})
df_retention_ab

fig = px.histogram(df['sum_gamerounds'][df['sum_gamerounds'] < 100], marginal='box')
fig.update_layout(xaxis_title='gamerounds per user', yaxis_title='users', title='Distribution of game rounds', showlegend=False)
fig.show(renderer='colab')