Skip to content
Texxl

From junior to geek the road is sleek

quantile

Quantile / percentile example in python

December 7, 2021 by admin

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}”)

Categories Python Tags example, percentile, python, quantile

How to calculate percentile (quantile) for each column in pandas dataframe

December 7, 2021December 7, 2021 by admin

Here we calculate 0.9th quantile of each column in our dataframe: q = 0.9 for column in df: qr = df[column].quantile(q) print(f”{q*100}% are lower than {qr}”) Here’s a good example to understand quantiles.

Categories Pandas Tags calculate, column, dataframe, pandas, percentile, quantile

Categories

  • C#
  • Database
    • MariaDB
    • mySQL
  • git
  • Networking
    • Linux
    • nginx
    • Windows Server
  • Python
    • Anaconda
    • Cython
    • dask
    • Machine Learning
    • Numba
    • numpy
    • Pandas
    • plotly
  • Software
  • Uncategorized
  • Wordpress

Archives

  • April 2023 (4)
  • February 2023 (1)
  • November 2022 (1)
  • September 2022 (4)
  • June 2022 (1)
  • May 2022 (1)
  • February 2022 (4)
  • December 2021 (5)
  • November 2021 (15)
  • October 2021 (5)
  • September 2021 (1)
  • August 2021 (3)
  • July 2021 (1)
  • June 2021 (10)
  • May 2021 (8)
  • April 2021 (5)

Popular Posts:

  • How to display text widget only with particular WordPress blog post
  • How to use ternary operator in python inside a Python string
  • What are the best cases for using decision trees in machine learning
  • What python libraries can be used to plot interactive candlesticks for trading
  • How to make featured images show up on the left side from content in the WordPress blog page

9software.com - your one-stop software shop!

© 2023 Texxl • Built with GeneratePress