MCPcopy
hub / github.com/pandas-dev/pandas / SubclassedSeries

Class SubclassedSeries

pandas/_testing/__init__.py:328–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

326
327
328class SubclassedSeries(Series):
329 _metadata = ["testattr", "name"]
330
331 @property
332 def _constructor(self):
333 # For testing, those properties return a generic callable, and not
334 # the actual class. In this case that is equivalent, but it is to
335 # ensure we don't rely on the property returning a class
336 # See https://github.com/pandas-dev/pandas/pull/46018 and
337 # https://github.com/pandas-dev/pandas/issues/32638 and linked issues
338 return lambda *args, **kwargs: SubclassedSeries(*args, **kwargs)
339
340 @property
341 def _constructor_expanddim(self):
342 return lambda *args, **kwargs: SubclassedDataFrame(*args, **kwargs)
343
344
345class SubclassedDataFrame(DataFrame):

Callers 2

_constructorMethod · 0.70
_constructor_slicedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected