Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
Write a program in Python to calculate the default float quantile value for all the element in a Series
Input −
Assume you have a series and default float quantile
value is 3.0
Solution
To solve this, we will follow the steps given below −
Define a Series
Assign quantile default value .5 to the series and calculate the result. It is defined below,
data.quantile(.5)
Example
Let us see the complete implementation to get a better understanding −
import pandas as pd l = [10,20,30,40,50] data = pd.Series(l) print(data.quantile(.5))
Output
30.0
Advertisements
