@@ -5930,8 +5930,68 @@ def ne(self, other, level=None, fill_value=None, axis: Axis = 0) -> Series:
5930
5930
other , operator .ne , level = level , fill_value = fill_value , axis = axis
5931
5931
)
5932
5932
5933
- @Appender (ops .make_flex_doc ("le" , "series" ))
5934
5933
def le (self , other , level = None , fill_value = None , axis : Axis = 0 ) -> Series :
5934
+ """
5935
+ Return Less than or equal to of series and other, \
5936
+ element-wise (binary operator `le`).
5937
+
5938
+ Equivalent to ``series <= other``, but with support to substitute a
5939
+ fill_value for missing data in either one of the inputs.
5940
+
5941
+ Parameters
5942
+ ----------
5943
+ other : Series or scalar value
5944
+ The second operand in this operation.
5945
+ level : int or name
5946
+ Broadcast across a level, matching Index values on the
5947
+ passed MultiIndex level.
5948
+ fill_value : None or float value, default None (NaN)
5949
+ Fill existing missing (NaN) values, and any new element needed for
5950
+ successful Series alignment, with this value before computation.
5951
+ If data in both corresponding Series locations is missing
5952
+ the result of filling (at that location) will be missing.
5953
+ axis : {0 or 'index'}
5954
+ Unused. Parameter needed for compatibility with DataFrame.
5955
+
5956
+ Returns
5957
+ -------
5958
+ Series
5959
+ The result of the operation.
5960
+
5961
+ See Also
5962
+ --------
5963
+ Series.ge : Return elementwise Greater than or equal to of series and other.
5964
+ Series.lt : Return elementwise Less than of series and other.
5965
+ Series.gt : Return elementwise Greater than of series and other.
5966
+ Series.eq : Return elementwise equal to of series and other.
5967
+
5968
+ Examples
5969
+ --------
5970
+ >>> a = pd.Series([1, 1, 1, np.nan, 1], index=['a', 'b', 'c', 'd', 'e'])
5971
+ >>> a
5972
+ a 1.0
5973
+ b 1.0
5974
+ c 1.0
5975
+ d NaN
5976
+ e 1.0
5977
+ dtype: float64
5978
+ >>> b = pd.Series([0, 1, 2, np.nan, 1], index=['a', 'b', 'c', 'd', 'f'])
5979
+ >>> b
5980
+ a 0.0
5981
+ b 1.0
5982
+ c 2.0
5983
+ d NaN
5984
+ f 1.0
5985
+ dtype: float64
5986
+ >>> a.le(b, fill_value=0)
5987
+ a False
5988
+ b True
5989
+ c True
5990
+ d False
5991
+ e False
5992
+ f True
5993
+ dtype: bool
5994
+ """
5935
5995
return self ._flex_method (
5936
5996
other , operator .le , level = level , fill_value = fill_value , axis = axis
5937
5997
)
0 commit comments