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

Method _can_hold_element

pandas/core/internals/blocks.py:318–321  ·  view source on GitHub ↗

require the same dtype as ourselves

(self, element: Any)

Source from the content-addressed store, hash-verified

316
317 @final
318 def _can_hold_element(self, element: Any) -> bool:
319 """require the same dtype as ourselves"""
320 element = extract_array(element, extract_numpy=True)
321 return can_hold_element(self.values, element)
322
323 @final
324 def should_store(self, value: ArrayLike) -> bool:

Calls 2

extract_arrayFunction · 0.90
can_hold_elementFunction · 0.90