Skip to content

Conversation

@jreback
Copy link
Contributor

@jreback jreback commented Feb 14, 2014

WIP on #3662

In [4]: household.join(portfolio, how='inner') Out[4]: male wealth name share household_id asset_id 1 nl0000301109 0 196087.3 ABN Amro 1.00 2 nl0000289783 1 316478.7 Robeco 0.40 gb00b03mlx29 1 316478.7 Royal Dutch Shell 0.60 3 gb00b03mlx29 0 294750.0 Royal Dutch Shell 0.15 lu0197800237 0 294750.0 AAB Eastern Europe Equity Fund 0.60 nl0000289965 0 294750.0 Postbank BioTech Fonds 0.25 [6 rows x 4 columns] In [5]: household.join(portfolio, how='outer') Out[5]: male wealth name share household_id asset_id 1 nl0000301109 0 196087.3 ABN Amro 1.00 2 nl0000289783 1 316478.7 Robeco 0.40 gb00b03mlx29 1 316478.7 Royal Dutch Shell 0.60 3 gb00b03mlx29 0 294750.0 Royal Dutch Shell 0.15 lu0197800237 0 294750.0 AAB Eastern Europe Equity Fund 0.60 nl0000289965 0 294750.0 Postbank BioTech Fonds 0.25 4 NaN NaN NaN NaN 1.00 [7 rows x 4 columns] In [8]: household.index.name='foo' In [9]: household.join(portfolio, how='outer') ValueError: cannot join with no level specified and no overlapping names 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement MultiIndex Reshaping Concat, Merge/Join, Stack/Unstack, Explode

1 participant