bigframes.pandas.DataFrame.truediv#
- DataFrame.truediv(other: float | int | Series | DataFrame, axis: str | int = 'columns') DataFrame[source]#
Get floating division of DataFrame and other, element-wise (binary operator /).
Equivalent to
dataframe / other. With reverse version, rtruediv.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], ... })
You can use method name:
>>> df['A'].truediv(df['B']) 0 0.25 1 0.4 2 0.5 dtype: Float64
You can also use arithmetic operator
/:>>> df['A'] / (df['B']) 0 0.25 1 0.4 2 0.5 dtype: Float64
- Parameters:
- Returns:
DataFrame result of the arithmetic operation.
- Return type: