9951 explained code solutions for 126 technologies


python-pandasHow to get 0.1 quantile for dataframe


import pandas as pd

data = pd.DataFrame({
  'Phone': ['ip5', 'ip6', 'ip8', 'sms', 'xi'],
  'Phone Price': [204, 304, 404, 405, 305]
})

q = data['Phone Price'].quantile(0.1)ctrl + c
import pandas as pd

load Pandas module

data

will contain loaded DataFrame

.quantile(

calculates specified quantile

'Phone Price'

column to calculate quantile for

0.1

will calculate 0.1 quantile