You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core.internals.Block references self.items. AFAICT items is an attribute of BlockManager, does not exist in Block.
ser = pd.Series(range(5))
mgr = ser._data
block = mgr.blocks[0]
>>> block.get(1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/pandas/core/internals.py", line 329, in get
loc = self.items.get_loc(item)
AttributeError: 'IntBlock' object has no attribute 'items'
The text was updated successfully, but these errors were encountered:
I think this is dead code. We always use positional indexing on a block (e.g. .iget). not sure why the linter doesn't find this. you can do a PR to remove.
About to make a PR for this. In doing this I noticed that there are reindex_axis methods defined in Block and SparseBlock that are never hit. Any chance these fall into the same category?
There are some usages of reindex_axis in the rest of the internals.py file, but it would need some more introspection to see whether this are calls on a block, or on something else that has such a method (eg there are some hasatrr(values, 'reindex_axis') calls, not sure if that would show in coverage if values is a block).
https://github.com/pandas-dev/pandas/blob/master/pandas/core/internals.py#L326
core.internals.Block
referencesself.items
. AFAICTitems
is an attribute ofBlockManager
, does not exist inBlock
.The text was updated successfully, but these errors were encountered: