Python Forum
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long'
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long'
#1
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?
Reply
#2
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)
Reply
#3
scidam,
Thank you very much! That seems to have fixed my problem. I can now move on to my next one. Big Grin
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  FutureWarning: Logical ops (and, or, xor) between Pandas objects and dtype-less seque NewBiee 5 1,490 Sep-12-2023, 03:15 PM
Last Post: deanhystad
Question I want to vectorize a really long for loop to improve performance Miregal1 1 1,890 Jul-18-2021, 11:13 AM
Last Post: jefsummers
  Data dtype error according to the rule "safe" AndreasMavro 5 9,014 Feb-27-2020, 10:46 PM
Last Post: Pama
  valueError: expected 2d, got 1d instead brkolvr 1 2,874 Aug-16-2019, 02:43 AM
Last Post: boring_accountant
  dtype in not working in mad() function ift38375 8 3,838 Jul-22-2019, 02:53 AM
Last Post: scidam
  Pandas melt only on one variable (leaving other in long format) amyd 0 1,933 May-08-2019, 12:10 PM
Last Post: amyd
  TypeError: expected string or bytes-like object twinpiques 1 25,676 May-06-2019, 08:29 PM
Last Post: Yoriz
  ValueError: Input contains infinity or a value too large for dtype('float64') Rabah_r 1 12,844 Apr-06-2019, 11:08 AM
Last Post: scidam
  Know in advance how long an algo is going to run nathan_toubiana 0 1,784 Mar-27-2019, 04:22 PM
Last Post: nathan_toubiana
  numpy dtype anomaly bluefrog 4 3,473 Nov-07-2018, 12:37 AM
Last Post: bluefrog

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020