Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- import numpy as np
- data = pd.Series([
- 10.7 , 9.58, 7.74, 8.3 , 11.82, 9.74, 10.18, 8.43, 8.71,
- 6.84, 9.26, 11.61, 11.08, 8.94, 8.44, 10.41, 9.36, 10.85,
- 10.41, 8.37, 8.99, 10.17, 7.78, 10.79, 10.61, 10.87, 7.43,
- 8.44, 9.44, 8.26, 7.98, 11.27, 11.61, 9.84, 12.47, 7.8 ,
- 10.54, 8.99, 7.33, 8.55, 8.06, 10.62, 10.41, 9.29, 9.98,
- 9.46, 9.99, 8.62, 11.34, 11.21, 15.19, 20.85, 19.15, 19.01,
- 15.24, 16.66, 17.62, 18.22, 17.2 , 15.76, 16.89, 15.22, 18.7 ,
- 14.84, 14.88, 19.41, 18.54, 17.85, 18.31, 13.68, 18.46, 13.99,
- 16.38, 16.88, 17.82, 15.17, 15.16, 18.15, 15.08, 15.91, 16.82,
- 16.85, 18.04, 17.51, 18.44, 15.33, 16.07, 17.22, 15.9 , 18.03,
- 17.26, 17.6 , 16.77, 17.45, 13.73, 14.95, 15.57, 19.19, 14.39,
- 15.76])
- state = np.random.RandomState(12345)
- # сохраните значения 99%-квантилей в переменной values
- values = []
- for i in range(1000):
- subsample = data.sample(frac=1, replace=True, random_state=state)
- # < напишите код здесь >
- values.append(subsample)
- # < напишите код здесь >
- values = pd.Series(values)
- lower = values.quantile(.05)# < напишите код здесь >
- upper = values.quantile(.95)# < напишите код здесь >
- print(lower)
- print(upper)
- """
- Traceback (most recent call last):
- File "main.py", line 30, in <module>
- ValueError: Can only compare identically-labeled Series objects
- """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement