Python Forum
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long' - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Data Science (https://python-forum.io/forum-44.html)
+--- Thread: ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long' (/thread-16729.html)



ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long' - MaJeFi - Mar-12-2019

I am new to Python. I got the error message in the title which is meaningless to me when my program got to the following line:
dfTemp = pd.concat([tenderers, newTenderer], axis=1) 
I am trying to join two dataframes on the vertical axis. Could someone either tell me what I am doing wrong or if there is another way of achieving my goal, please?


RE: ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long' - scidam - Mar-14-2019

What data frames are defined under tenderers and newTenderer ? tenderers.info()?
To do vertical concatenation you need to pass axis=0 instead:
# short example
import pandas as pd
x = pd.DataFrame(pd.np.random.rand(10,10))
pd.concat([x, x], axis=0)



RE: ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long' - MaJeFi - Mar-20-2019

scidam,
Thank you very much! That seems to have fixed my problem. I can now move on to my next one. Big Grin