(self, other, axis="columns", level=None, fill_value=None)
| 210 | if class_ == DataFrame: |
| 211 | |
| 212 | def method(self, other, axis="columns", level=None, fill_value=None): |
| 213 | if level is not None: |
| 214 | raise NotImplementedError("level must be None") |
| 215 | |
| 216 | axis = _validate_axis(axis) |
| 217 | |
| 218 | if ( |
| 219 | is_dataframe_like(other) |
| 220 | or is_series_like(other) |
| 221 | and axis in (0, "index") |
| 222 | ) and not is_dask_collection(other): |
| 223 | other = self._create_alignable_frame(other) |
| 224 | |
| 225 | if axis in (1, "columns"): |
| 226 | if isinstance(other, Series): |
| 227 | msg = f"Unable to {name} dd.Series with axis=1" |
| 228 | raise ValueError(msg) |
| 229 | |
| 230 | frame = self |
| 231 | if isinstance(other, FrameBase) and not expr.are_co_aligned( |
| 232 | self.expr, other.expr |
| 233 | ): |
| 234 | return new_collection( |
| 235 | expr.MethodOperatorAlign( |
| 236 | op=name, |
| 237 | frame=frame, |
| 238 | other=other, |
| 239 | axis=axis, |
| 240 | level=level, |
| 241 | fill_value=fill_value, |
| 242 | ) |
| 243 | ) |
| 244 | |
| 245 | return new_collection( |
| 246 | expr.MethodOperator( |
| 247 | name=name, |
| 248 | left=frame, |
| 249 | right=other, |
| 250 | axis=axis, |
| 251 | level=level, |
| 252 | fill_value=fill_value, |
| 253 | ) |
| 254 | ) |
| 255 | |
| 256 | elif class_ == Series: |
| 257 |
no test coverage detected