Olá, apesar o código identico ao do professor, meu grafico dá erro:
ValueError Traceback (most recent call last)
<ipython-input-205-0fbd9de4cbb6> in <cell line: 5>()
3 tamanho_simulacao = 1000
4
----> 5 medias = [renda_5000.sample(n = n).mean() for i in range(1, tamanho_simulacao)]
6 medias = pd.DataFrame(medias)
7
2 frames
/usr/local/lib/python3.10/dist-packages/pandas/core/sample.py in process_sampling_size(n, frac, replace)
97 )
98 if n % 1 != 0:
---> 99 raise ValueError("Only integers accepted as `n` values")
100 else:
101 assert frac is not None # for mypy
ValueError: Only integers accepted as `n` values