Problem with concatenating two dataframes

Schachner, Joseph Joseph.Schachner at Teledyne.com
Mon Nov 8 14:29:42 EST 2021


The problem I see here is use of Pandas.   I know I have he losing opinion, but people who use Python to load Panadas and then only use Pandas are missing out on the functionality of Python.

I'll bet you could code combining this data in pure Python, into one dictionary. In fact I'd be shocked if you couldn't do it.

---- Joseph S.


Teledyne Confidential; Commercially Sensitive Business Data

-----Original Message-----
From: Mahmood Naderan <nt_mahmood at yahoo.com> 
Sent: Saturday, November 6, 2021 6:01 PM
To: python-list at python.org; MRAB <python at mrabarnett.plus.com>
Subject: Re: Problem with concatenating two dataframes

>The second argument of pd.concat is 'axis', which defaults to 0. Try 
>using 1 instead of 0.


Unfortunately, that doesn't help...


dict[name] = pd.concat( [dict[name],values], axis=1 )



{'dummy':     Value
M1      0
M2      0
M3      0, 'K1':    Value  Value
0   10.0    NaN
1    5.0    NaN
2   10.0    NaN
6    NaN    2.0
7    NaN    2.0
8    NaN    2.0, 'K2':    Value
3     20
4     10
5     15}



Regards,
Mahmood





More information about the Python-list mailing list