Quantile / percentile example in python
Here’s a good example to understand quantiles in python: import numpy as np d = [1, 1.2, 1.5, 2, 6, 7, 22, 3] q = 0.99 qr = np.quantile(d, q) print(f”{q*100}% less than {qr}”)
Here’s a good example to understand quantiles in python: import numpy as np d = [1, 1.2, 1.5, 2, 6, 7, 22, 3] q = 0.99 qr = np.quantile(d, q) print(f”{q*100}% less than {qr}”)
import pandas as pd from datetime import datetime import plotly import plotly.graph_objects as go df = pd.read_csv(‘https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv’) fig = go.Figure(data=[go.Candlestick(x=df[‘Date’], open=df[‘AAPL.Open’], high=df[‘AAPL.High’], low=df[‘AAPL.Low’], close=df[‘AAPL.Close’])]) # fig.show() plotly.offline.plot(fig)