RecTools icon indicating copy to clipboard operation
RecTools copied to clipboard

AttributeError: 'IntegerArray' object has no attribute 'size'

Open groundmax opened this issue 2 years ago • 0 comments
trafficstars

Reproducible example

With pandas==0.25.3

import pandas as pd
from rectools.dataset import IdMap

user_id_map = IdMap.from_values(pd.array([1, 2], dtype=pd.Int32Dtype()))
user_id_map.size
# AttributeError: 'IntegerArray' object has no attribute 'size'

Issue description

The issue seems to be affecting not only pandas==0.25.3, but also pandas==1.0.x (didn't check it thoroughly) There is no such problem with version pandas==1.1.0 and higher

Expected behaviour

Accessing size of IdMap with IntegerArray type doesn't throw an AttributeError

groundmax avatar Mar 07 '23 18:03 groundmax