Skip to content
Advertisement

Pandas, convert values of DataFrames into tuple-DataFrame

I have a DataFrame:

JavaScript

and a second DataFrame:

JavaScript

and i need this two Dataframes to become this one DataFrame:

JavaScript

I need nice little tuples, all together in one frame. How is that possible?

Advertisement

Answer

Create tuples in both DataFrames and join by +:

JavaScript

Or join by concat and aggregate by index tuple:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement