@@ -134,15 +134,13 @@ def bufsize(self) -> int:
134
134
"""
135
135
Buffer size in bytes.
136
136
"""
137
- pass
138
137
139
138
@property
140
139
@abstractmethod
141
140
def ptr (self ) -> int :
142
141
"""
143
142
Pointer to start of the buffer as an integer.
144
143
"""
145
- pass
146
144
147
145
@abstractmethod
148
146
def __dlpack__ (self ):
@@ -166,7 +164,6 @@ def __dlpack_device__(self) -> tuple[DlpackDeviceType, int | None]:
166
164
Uses device type codes matching DLPack.
167
165
Note: must be implemented even if ``__dlpack__`` is not.
168
166
"""
169
- pass
170
167
171
168
172
169
class Column (ABC ):
@@ -222,7 +219,6 @@ def size(self) -> int:
222
219
Corresponds to DataFrame.num_rows() if column is a single chunk;
223
220
equal to size of this current chunk otherwise.
224
221
"""
225
- pass
226
222
227
223
@property
228
224
@abstractmethod
@@ -234,7 +230,6 @@ def offset(self) -> int:
234
230
equal size M (only the last chunk may be shorter),
235
231
``offset = n * M``, ``n = 0 .. N-1``.
236
232
"""
237
- pass
238
233
239
234
@property
240
235
@abstractmethod
@@ -266,7 +261,6 @@ def dtype(self) -> tuple[DtypeKind, int, str, str]:
266
261
- Data types not included: complex, Arrow-style null, binary, decimal,
267
262
and nested (list, struct, map, union) dtypes.
268
263
"""
269
- pass
270
264
271
265
@property
272
266
@abstractmethod
@@ -289,7 +283,6 @@ def describe_categorical(self) -> CategoricalDescription:
289
283
290
284
TBD: are there any other in-memory representations that are needed?
291
285
"""
292
- pass
293
286
294
287
@property
295
288
@abstractmethod
@@ -302,7 +295,6 @@ def describe_null(self) -> tuple[ColumnNullType, Any]:
302
295
mask or a byte mask, the value (0 or 1) indicating a missing value. None
303
296
otherwise.
304
297
"""
305
- pass
306
298
307
299
@property
308
300
@abstractmethod
@@ -312,22 +304,19 @@ def null_count(self) -> int | None:
312
304
313
305
Note: Arrow uses -1 to indicate "unknown", but None seems cleaner.
314
306
"""
315
- pass
316
307
317
308
@property
318
309
@abstractmethod
319
310
def metadata (self ) -> dict [str , Any ]:
320
311
"""
321
312
The metadata for the column. See `DataFrame.metadata` for more details.
322
313
"""
323
- pass
324
314
325
315
@abstractmethod
326
316
def num_chunks (self ) -> int :
327
317
"""
328
318
Return the number of chunks the column consists of.
329
319
"""
330
- pass
331
320
332
321
@abstractmethod
333
322
def get_chunks (self , n_chunks : int | None = None ) -> Iterable [Column ]:
@@ -336,7 +325,6 @@ def get_chunks(self, n_chunks: int | None = None) -> Iterable[Column]:
336
325
337
326
See `DataFrame.get_chunks` for details on ``n_chunks``.
338
327
"""
339
- pass
340
328
341
329
@abstractmethod
342
330
def get_buffers (self ) -> ColumnBuffers :
@@ -360,7 +348,6 @@ def get_buffers(self) -> ColumnBuffers:
360
348
if the data buffer does not have an associated offsets
361
349
buffer.
362
350
"""
363
- pass
364
351
365
352
366
353
# def get_children(self) -> Iterable[Column]:
@@ -391,7 +378,6 @@ class DataFrame(ABC):
391
378
@abstractmethod
392
379
def __dataframe__ (self , nan_as_null : bool = False , allow_copy : bool = True ):
393
380
"""Construct a new interchange object, potentially changing the parameters."""
394
- pass
395
381
396
382
@property
397
383
@abstractmethod
@@ -405,14 +391,12 @@ def metadata(self) -> dict[str, Any]:
405
391
entries, please add name the keys with the name of the library
406
392
followed by a period and the desired name, e.g, ``pandas.indexcol``.
407
393
"""
408
- pass
409
394
410
395
@abstractmethod
411
396
def num_columns (self ) -> int :
412
397
"""
413
398
Return the number of columns in the DataFrame.
414
399
"""
415
- pass
416
400
417
401
@abstractmethod
418
402
def num_rows (self ) -> int | None :
@@ -422,56 +406,48 @@ def num_rows(self) -> int | None:
422
406
"""
423
407
Return the number of rows in the DataFrame, if available.
424
408
"""
425
- pass
426
409
427
410
@abstractmethod
428
411
def num_chunks (self ) -> int :
429
412
"""
430
413
Return the number of chunks the DataFrame consists of.
431
414
"""
432
- pass
433
415
434
416
@abstractmethod
435
417
def column_names (self ) -> Iterable [str ]:
436
418
"""
437
419
Return an iterator yielding the column names.
438
420
"""
439
- pass
440
421
441
422
@abstractmethod
442
423
def get_column (self , i : int ) -> Column :
443
424
"""
444
425
Return the column at the indicated position.
445
426
"""
446
- pass
447
427
448
428
@abstractmethod
449
429
def get_column_by_name (self , name : str ) -> Column :
450
430
"""
451
431
Return the column whose name is the indicated name.
452
432
"""
453
- pass
454
433
455
434
@abstractmethod
456
435
def get_columns (self ) -> Iterable [Column ]:
457
436
"""
458
437
Return an iterator yielding the columns.
459
438
"""
460
- pass
461
439
462
440
@abstractmethod
463
441
def select_columns (self , indices : Sequence [int ]) -> DataFrame :
464
442
"""
465
443
Create a new DataFrame by selecting a subset of columns by index.
466
444
"""
467
- pass
468
445
469
446
@abstractmethod
470
447
def select_columns_by_name (self , names : Sequence [str ]) -> DataFrame :
471
448
"""
472
449
Create a new DataFrame by selecting a subset of columns by name.
473
450
"""
474
- pass
475
451
476
452
@abstractmethod
477
453
def get_chunks (self , n_chunks : int | None = None ) -> Iterable [DataFrame ]:
@@ -483,4 +459,3 @@ def get_chunks(self, n_chunks: int | None = None) -> Iterable[DataFrame]:
483
459
``self.num_chunks()``, meaning the producer must subdivide each chunk
484
460
before yielding it.
485
461
"""
486
- pass
0 commit comments