BUG: object of type 'int' has no len() in from_dict function #46092
Labels
Bug
Constructors
Series/DataFrame/Index/pd.array Constructors
Docs
Needs Triage
Issue that has not been reviewed by a pandas team member
Usage Question
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
gives no problem , but if i change the dict order I get
I get object of type 'int' has no len()
Expected Behavior
d={ 'b':2,'a': [3,2],}
pandas.DataFrame.from_dict(d,orient='index')
Installed Versions
INSTALLED VERSIONS
commit : 7d32926
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-26-generic
Version : #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : it_IT.UTF-8
LOCALE : it_IT.UTF-8
pandas : 1.2.2
numpy : 1.19.2
pytz : 2021.1
dateutil : 2.8.1
pip : 22.0.2
setuptools : 49.2.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.18.1
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : 3.3.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.5.2
sqlalchemy : None
tables : None
tabulate : 0.8.9
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: