(self, other, axis="columns", level=None, fill_value=None)
| 196 | if class_ == DataFrame: |
| 197 | |
| 198 | def method(self, other, axis="columns", level=None, fill_value=None): |
| 199 | if level is not None: |
| 200 | raise NotImplementedError("level must be None") |
| 201 | |
| 202 | axis = _validate_axis(axis) |
| 203 | |
| 204 | if ( |
| 205 | is_dataframe_like(other) |
| 206 | or is_series_like(other) |
| 207 | and axis in (0, "index") |
| 208 | ) and not is_dask_collection(other): |
| 209 | other = self._create_alignable_frame(other) |
| 210 | |
| 211 | if axis in (1, "columns"): |
| 212 | if isinstance(other, Series): |
| 213 | msg = f"Unable to {name} dd.Series with axis=1" |
| 214 | raise ValueError(msg) |
| 215 | |
| 216 | frame = self |
| 217 | if isinstance(other, FrameBase) and not expr.are_co_aligned( |
| 218 | self.expr, other.expr |
| 219 | ): |
| 220 | return new_collection( |
| 221 | expr.MethodOperatorAlign( |
| 222 | op=name, |
| 223 | frame=frame, |
| 224 | other=other, |
| 225 | axis=axis, |
| 226 | level=level, |
| 227 | fill_value=fill_value, |
| 228 | ) |
| 229 | ) |
| 230 | |
| 231 | return new_collection( |
| 232 | expr.MethodOperator( |
| 233 | name=name, |
| 234 | left=frame, |
| 235 | right=other, |
| 236 | axis=axis, |
| 237 | level=level, |
| 238 | fill_value=fill_value, |
| 239 | ) |
| 240 | ) |
| 241 | |
| 242 | elif class_ == Series: |
| 243 |
no test coverage detected