-  
-   Notifications  You must be signed in to change notification settings 
- Fork 19.2k
Description
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
import pandas as pd # Create a list of data data = [["Alice", 25], ["Bob", 30], ["Carol", 35]] # Create a Pandas DataFrame from the list of data df = pd.DataFrame(data, columns=["Name", "Age"]) # Print the DataFrame print(df)Issue Description
The simplest test on a dataframe object is failing on an embedded 32bit device with ARMv7 CPU. No matter how the dataframe is created, from an array or read from a csv file using read_csv, access on the object fails the same:
File "pandas/_libs/internals.pyx", line 711, in pandas._libs.internals.BlockManager._rebuild_blknos_and_blklocs
 ValueError: Buffer dtype mismatch, expected 'intp_t' but got 'long long'
Unfortunately, on that platform I cannot compile a newer version of pandas, so I cannot verify if the issue is present in the latest version or main branch.
Expected Behavior
The expected output is:
 Name Age
 0 Alice 25
 1 Bob 30
 2 Carol 35
but running the script is giving:
 File "/home/root/test.py", line 10, in 
 print(df)
 File "/usr/lib/python3.10/site-packages/pandas/core/frame.py", line 1011, in repr
 return self.to_string(**repr_params)
 File "/usr/lib/python3.10/site-packages/pandas/core/frame.py", line 1192, in to_string
 return fmt.DataFrameRenderer(formatter).to_string(
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/format.py", line 1128, in to_string
 string = string_formatter.to_string()
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/string.py", line 25, in to_string
 text = self._get_string_representation()
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/string.py", line 40, in _get_string_representation
 strcols = self._get_strcols()
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/string.py", line 31, in _get_strcols
 strcols = self.fmt.get_strcols()
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/format.py", line 611, in get_strcols
 strcols = self._get_strcols_without_index()
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/format.py", line 864, in _get_strcols_without_index
 str_columns = self._get_formatted_column_labels(self.tr_frame)
 File "/usr/lib/python3.10/site-packages/pandas/io/formats/format.py", line 943, in _get_formatted_column_labels
 dtypes = self.frame.dtypes
 File "/usr/lib/python3.10/site-packages/pandas/core/generic.py", line 5746, in dtypes
 data = self._mgr.get_dtypes()
 File "/usr/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 228, in get_dtypes
 return dtypes.take(self.blknos)
 File "/usr/lib/python3.10/site-packages/pandas/core/internals/managers.py", line 168, in blknos
 self._rebuild_blknos_and_blklocs()
 File "pandas/_libs/internals.pyx", line 711, in pandas._libs.internals.BlockManager._rebuild_blknos_and_blklocs
 ValueError: Buffer dtype mismatch, expected 'intp_t' but got 'long long'
Installed Versions
commit : 4bfe3d0
 python : 3.10.4.final.0
 python-bits : 32
 OS : Linux
 OS-release : 5.15.32-yoctoEMB+gddbcf3882cd3
 Version : #1 SMP PREEMPT Thu Apr 13 04:27:17 UTC 2023
 machine : armv7l
 processor : armv7l
 byteorder : little
 LC_ALL : None
 LANG : None
 LOCALE : None.None
pandas : 1.4.2
 numpy : 1.22.3
 pytz : 2022.1
 dateutil : 2.8.2
 pip : 22.0.3
 setuptools : 59.5.0
 Cython : 0.29.28
 pytest : 7.1.1