Find the appropriate name to pin to an operation result. This result should always be either an Index or a Series. Parameters ---------- left : {Series, Index} right : object Returns ------- name : object Usually a string
(left, right)
| 90 | |
| 91 | |
| 92 | def get_op_result_name(left, right): |
| 93 | """ |
| 94 | Find the appropriate name to pin to an operation result. This result |
| 95 | should always be either an Index or a Series. |
| 96 | |
| 97 | Parameters |
| 98 | ---------- |
| 99 | left : {Series, Index} |
| 100 | right : object |
| 101 | |
| 102 | Returns |
| 103 | ------- |
| 104 | name : object |
| 105 | Usually a string |
| 106 | """ |
| 107 | if isinstance(right, (ABCSeries, ABCIndex)): |
| 108 | name = _maybe_match_name(left, right) |
| 109 | else: |
| 110 | name = left.name |
| 111 | return name |
| 112 | |
| 113 | |
| 114 | def _maybe_match_name(a, b): |
no test coverage detected