Examples
import numpy as np
import pandas as pd
df = pd.DataFrame(np.array([[2, 2], [3, 20], [4, 200], [5, 200]]),
columns=['p', 'q'])
df.quantile(.1)
df.quantile([.2, .5])
Specifying numeric_only=False will also compute the quantile of datetime and timedelta data:
df = pd.DataFrame({'P': [2, 3],
'Q': [pd.Timestamp('2018'),
pd.Timestamp('2019')],
'R': [pd.Timedelta('1 days'),
pd.Timedelta('2 days')]})
df.quantile(0.3, numeric_only=False)