Lets say I have two dfs - teachers and departments
teacher_id, name, dep_id
1, ABC, 10
2, XYZ, 20
dep_id
10
20
40
50
I want to duplicate teachers rows for the missing departments. so the output needs to be:
teacher_id, name, dep_id
1, ABC, 10
1, ABC, 20
1, ABC, 40
1, ABC, 50
2, XYZ, 20
2, XYZ, 10
2, XYZ, 40
2, XYZ, 50
Outer Join and merges with pandas will put a NaN for teacher_id and name. I want to duplicate the values. Any ideas how to do this simple ?