Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-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

9 statements  

1""" 

2Arithmetic operations for PandasObjects 

3 

4This is not a public API. 

5""" 

6from __future__ import annotations 

7 

8from pandas.core.ops.array_ops import ( 

9 arithmetic_op, 

10 comp_method_OBJECT_ARRAY, 

11 comparison_op, 

12 fill_binop, 

13 get_array_op, 

14 logical_op, 

15 maybe_prepare_scalar_for_op, 

16) 

17from pandas.core.ops.common import ( 

18 get_op_result_name, 

19 unpack_zerodim_and_defer, 

20) 

21from pandas.core.ops.docstrings import make_flex_doc 

22from pandas.core.ops.invalid import invalid_comparison 

23from pandas.core.ops.mask_ops import ( 

24 kleene_and, 

25 kleene_or, 

26 kleene_xor, 

27) 

28from pandas.core.roperator import ( 

29 radd, 

30 rand_, 

31 rdiv, 

32 rdivmod, 

33 rfloordiv, 

34 rmod, 

35 rmul, 

36 ror_, 

37 rpow, 

38 rsub, 

39 rtruediv, 

40 rxor, 

41) 

42 

43# ----------------------------------------------------------------------------- 

44# constants 

45ARITHMETIC_BINOPS: set[str] = { 

46 "add", 

47 "sub", 

48 "mul", 

49 "pow", 

50 "mod", 

51 "floordiv", 

52 "truediv", 

53 "divmod", 

54 "radd", 

55 "rsub", 

56 "rmul", 

57 "rpow", 

58 "rmod", 

59 "rfloordiv", 

60 "rtruediv", 

61 "rdivmod", 

62} 

63 

64 

65__all__ = [ 

66 "ARITHMETIC_BINOPS", 

67 "arithmetic_op", 

68 "comparison_op", 

69 "comp_method_OBJECT_ARRAY", 

70 "invalid_comparison", 

71 "fill_binop", 

72 "kleene_and", 

73 "kleene_or", 

74 "kleene_xor", 

75 "logical_op", 

76 "make_flex_doc", 

77 "radd", 

78 "rand_", 

79 "rdiv", 

80 "rdivmod", 

81 "rfloordiv", 

82 "rmod", 

83 "rmul", 

84 "ror_", 

85 "rpow", 

86 "rsub", 

87 "rtruediv", 

88 "rxor", 

89 "unpack_zerodim_and_defer", 

90 "get_op_result_name", 

91 "maybe_prepare_scalar_for_op", 

92 "get_array_op", 

93]