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

Method _pad_or_backfill

pandas/core/arrays/period.py:999–1016  ·  view source on GitHub ↗
(
        self,
        *,
        method: FillnaOptions,
        limit: int | None = None,
        limit_area: Literal["inside", "outside"] | None = None,
        copy: bool = True,
    )

Source from the content-addressed store, hash-verified

997 return m8arr.searchsorted(npvalue, side=side, sorter=sorter)
998
999 def _pad_or_backfill(
1000 self,
1001 *,
1002 method: FillnaOptions,
1003 limit: int | None = None,
1004 limit_area: Literal["inside", "outside"] | None = None,
1005 copy: bool = True,
1006 ) -> Self:
1007 # view as dt64 so we get treated as timelike in core.missing,
1008 # similar to dtl._period_dispatch
1009 dta = self.view("M8[ns]")
1010 result = dta._pad_or_backfill(
1011 method=method, limit=limit, limit_area=limit_area, copy=copy
1012 )
1013 if copy:
1014 return cast("Self", result.view(self.dtype))
1015 else:
1016 return self
1017
1018 # ------------------------------------------------------------------
1019 # Arithmetic Methods

Callers 2

pad_or_backfillMethod · 0.45
pad_or_backfillMethod · 0.45

Calls 1

viewMethod · 0.45

Tested by

no test coverage detected