Bottom Page

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?
Quote
#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)
Quote
#3
scidam,
Thank you very much! That seems to have fixed my problem. I can now move on to my next one. Big Grin
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Data dtype error according to the rule "safe" AndreasMavro 5 2,314 Feb-27-2020, 10:46 PM
Last Post: Pama
  valueError: expected 2d, got 1d instead brkolvr 1 1,071 Aug-16-2019, 02:43 AM
Last Post: boring_accountant
  dtype in not working in mad() function ift38375 8 644 Jul-22-2019, 02:53 AM
Last Post: scidam
  Pandas melt only on one variable (leaving other in long format) amyd 0 477 May-08-2019, 12:10 PM
Last Post: amyd
  TypeError: expected string or bytes-like object twinpiques 1 19,375 May-06-2019, 08:29 PM
Last Post: Yoriz
  ValueError: Input contains infinity or a value too large for dtype('float64') Rabah_r 1 6,350 Apr-06-2019, 11:08 AM
Last Post: scidam
  Know in advance how long an algo is going to run nathan_toubiana 0 462 Mar-27-2019, 04:22 PM
Last Post: nathan_toubiana
  numpy dtype anomaly bluefrog 4 970 Nov-07-2018, 12:37 AM
Last Post: bluefrog

Forum Jump:


Users browsing this thread: 1 Guest(s)