Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/pandas/core/ops/__init__.py: 100%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

10 statements  

1""" 

2Arithmetic operations for PandasObjects 

3 

4This is not a public API. 

5""" 

6 

7from __future__ import annotations 

8 

9from pandas.core.ops.array_ops import ( 

10 arithmetic_op, 

11 comp_method_OBJECT_ARRAY, 

12 comparison_op, 

13 fill_binop, 

14 get_array_op, 

15 logical_op, 

16 maybe_prepare_scalar_for_op, 

17) 

18from pandas.core.ops.common import ( 

19 get_op_result_name, 

20 unpack_zerodim_and_defer, 

21) 

22from pandas.core.ops.docstrings import make_flex_doc 

23from pandas.core.ops.invalid import invalid_comparison 

24from pandas.core.ops.mask_ops import ( 

25 kleene_and, 

26 kleene_or, 

27 kleene_xor, 

28) 

29from pandas.core.roperator import ( 

30 radd, 

31 rand_, 

32 rdiv, 

33 rdivmod, 

34 rfloordiv, 

35 rmod, 

36 rmul, 

37 ror_, 

38 rpow, 

39 rsub, 

40 rtruediv, 

41 rxor, 

42) 

43 

44# ----------------------------------------------------------------------------- 

45# constants 

46ARITHMETIC_BINOPS: set[str] = { 

47 "add", 

48 "sub", 

49 "mul", 

50 "pow", 

51 "mod", 

52 "floordiv", 

53 "truediv", 

54 "divmod", 

55 "radd", 

56 "rsub", 

57 "rmul", 

58 "rpow", 

59 "rmod", 

60 "rfloordiv", 

61 "rtruediv", 

62 "rdivmod", 

63} 

64 

65 

66__all__ = [ 

67 "ARITHMETIC_BINOPS", 

68 "arithmetic_op", 

69 "comp_method_OBJECT_ARRAY", 

70 "comparison_op", 

71 "fill_binop", 

72 "get_array_op", 

73 "get_op_result_name", 

74 "invalid_comparison", 

75 "kleene_and", 

76 "kleene_or", 

77 "kleene_xor", 

78 "logical_op", 

79 "make_flex_doc", 

80 "maybe_prepare_scalar_for_op", 

81 "radd", 

82 "rand_", 

83 "rdiv", 

84 "rdivmod", 

85 "rfloordiv", 

86 "rmod", 

87 "rmul", 

88 "ror_", 

89 "rpow", 

90 "rsub", 

91 "rtruediv", 

92 "rxor", 

93 "unpack_zerodim_and_defer", 

94]