by thought is using iterate the data frame column and check for required data in another column using condition checks. suggest is it correct or any other way.
Asked
Active
Viewed 84 times
-2
-
1please refer to [MCVE](https://stackoverflow.com/help/mcve), for everyone's benefit and time not being wasted, could you post sample data and what you have tried so far. one sentence won't get us anywhere. thanks a lot. – stucash Dec 08 '17 at 13:00
2 Answers
1
-
two data frames are didn't have any common column. but the first data frame column x data is matching with 2nd data frame of one column data but the data is in list of dictionary( one key of dict is matching with one column of 1st data frame) – Rakesh Bhagam Dec 08 '17 at 14:37
-
df1 = [{'name': 'Anastasia', 'score': 12.5}, {'name': 'Dima', 'score': 9}, {'name': 'Katherine', 'data': 16.5}] df2 = [{'test': 'ram', 'data': [{'xyz': '12.5', 'abc': 'ram'} ], {'test': 'jump', 'data': [{'xyz': '9', 'abc': 'jam'}], {'test': 'bheem', 'data': [{'xyz': '16.5', 'abc': 'pim'}]] in df1 column "Score: and df2 data[xyz] are common with this reference i want to merge my data frames : can any one help – Rakesh Bhagam Dec 08 '17 at 14:53
-
0
You should have a look at pandas merge
function.

Guillaume Jacquenot
- 11,217
- 6
- 43
- 49
-
Thanks @Guillame, tried all those, its little different case, no common column to merge. refer above example – Rakesh Bhagam Dec 08 '17 at 14:55