Create a new DataFrame by selecting a subset of columns by index.
(self, indices: Sequence[int])
| 156 | ] |
| 157 | |
| 158 | def select_columns(self, indices: Sequence[int]) -> _PyArrowDataFrame: |
| 159 | """ |
| 160 | Create a new DataFrame by selecting a subset of columns by index. |
| 161 | """ |
| 162 | return _PyArrowDataFrame( |
| 163 | self._df.select(list(indices)), self._nan_as_null, self._allow_copy |
| 164 | ) |
| 165 | |
| 166 | def select_columns_by_name( |
| 167 | self, names: Sequence[str] |