(self, axis=None)
| 3317 | |
| 3318 | @derived_from(pd.DataFrame) |
| 3319 | def squeeze(self, axis=None): |
| 3320 | if axis in [None, 1]: |
| 3321 | if len(self.columns) == 1: |
| 3322 | return self[self.columns[0]] |
| 3323 | else: |
| 3324 | return self |
| 3325 | |
| 3326 | elif axis == 0: |
| 3327 | raise NotImplementedError( |
| 3328 | f"{type(self)} does not support squeeze along axis 0" |
| 3329 | ) |
| 3330 | |
| 3331 | else: |
| 3332 | raise ValueError(f"No axis {axis} for object type {type(self)}") |
| 3333 | |
| 3334 | @derived_from(pd.DataFrame) |
| 3335 | def explode(self, column): |
no outgoing calls