Detail: IndexYearMonth: Operator Binary

Overview: IndexYearMonth: Operator Binary

IndexYearMonth.__add__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix + 2
['1517-06' '1518-02' '1517-08']
IndexYearMonth.__and__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix & True
TypeError("ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
>>> ix & (False, True)
TypeError("ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
IndexYearMonth.__eq__(other)

Return self==value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix == '1517-06'
[False False  True]
IndexYearMonth.__floordiv__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix // '1517-06'
UFuncTypeError(<ufunc 'floor_divide'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__ge__(other)

Return self>=value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix >= '1517-06'
[False  True  True]
IndexYearMonth.__gt__(other)

Return self>value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix > '1517-06'
[False  True False]
IndexYearMonth.__le__(other)

Return self<=value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix <= '1517-06'
[ True False  True]
IndexYearMonth.__lt__(other)

Return self<value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix < '1517-06'
[ True False False]
IndexYearMonth.__matmul__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix @ (3, 0, 4, 0)
NotImplementedError('matrix multiplication not supported')
IndexYearMonth.__mod__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix % '1517-06'
UFuncTypeError(<ufunc 'remainder'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__mul__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix * '1517-06'
UFuncTypeError(<ufunc 'multiply'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__ne__(other)

Return self!=value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix != '1517-06'
[ True  True False]
IndexYearMonth.__or__(other)

Return self|value.

>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix | True
TypeError("ufunc 'bitwise_or' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
>>> ix | (False, True)
TypeError("ufunc 'bitwise_or' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
IndexYearMonth.__pow__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix ** '1517-06'
TypeError("ufunc 'power' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
IndexYearMonth.__radd__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> '1517-06' + ix
UFuncTypeError(<ufunc 'add'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__rfloordiv__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> '1517-06' // ix
UFuncTypeError(<ufunc 'floor_divide'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__rmatmul__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix @ (3, 0, 4, 0)
NotImplementedError('matrix multiplication not supported')
IndexYearMonth.__rmul__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> '1517-06' * ix
UFuncTypeError(<ufunc 'multiply'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__rshift__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix >> 1
TypeError("ufunc 'right_shift' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
IndexYearMonth.__rsub__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> '1517-06' - ix
[ 2 -6  0]
IndexYearMonth.__rtruediv__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> '1517-06' / ix
UFuncTypeError(<ufunc 'divide'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__sub__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix - 2
['1517-02' '1517-10' '1517-04']
IndexYearMonth.__truediv__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix / '1517-06'
UFuncTypeError(<ufunc 'divide'>, (dtype('<M8[M]'), dtype('<M8[M]')))
IndexYearMonth.__xor__(other)
>>> ix = sf.IndexYearMonth(('1517-04', '1517-12', '1517-06'))
>>> ix
<IndexYearMonth>
1517-04
1517-12
1517-06
<datetime64[M]>
>>> ix ^ True
TypeError("ufunc 'bitwise_xor' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")
>>> ix ^ (False, True)
TypeError("ufunc 'bitwise_xor' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''")

IndexYearMonth: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Operator Binary | Operator Unary | Accessor Values | Accessor Datetime | Accessor String | Accessor Regular Expression | Accessor Hashlib | Accessor Type Clinic