[ Web Proxy ]
URL:
Viewing: https://dataframes.bigquery.dev/reference/api/bigframes.pandas.DataFrame.rmod.html [Back]  [Original]

bigframes.pandas.DataFrame.rmod — bigframes documentation
Back to top
Search the docs ...:

bigframes.pandas.DataFrame.rmod#

DataFrame.rmod(other: int | Series | DataFrame, axis: str | int = 'columns') DataFrame[source]#

Get modulo of DataFrame and other, element-wise (binary operator %).

Equivalent to other % dataframe. With reverse version, mod.

Among flexible wrappers (add, sub, mul, div, mod, pow) to arithmetic operators: +, -, *, /, //, %, **.

Note

Mismatched indices will be unioned together.

Examples:

>>> df = bpd.DataFrame({
...     'A': [1, 2, 3],
...     'B': [4, 5, 6],
...     })
>>> df['A'].rmod(df['B'])
0    0
1    1
2    0
dtype: Int64

Its equivalent to using arithmetic operator: %:

>>> df['B'] % (df['A'])
0    0
1    1
2    0
dtype: Int64
Parameters:
  • other (float, int, or Series) Any single or multiple element data structure, or list-like object.

  • axis ({0 or 'index', 1 or 'columns'}) Whether to compare by the index (0 or index) or columns. (1 or columns). For Series input, axis to match Series index on.

Returns:

DataFrame result of the arithmetic operation.

Return type:

bigframes.pandas.DataFrame


Web Proxy Viewer  |  New URL  |  Original Page