Use a comprehension
pd.DataFrame([
[p, t, i] for P, T, i in df.values
for p in P for t in T
], columns=df.columns)
Job position Job type id
0 6 1 3
1 2 3 4
2 2 6 4
3 2 5 4
4 6 3 4
5 6 6 4
6 6 5 4
7 1 9 43
Alternatives to iterating over values
pd.DataFrame([
[p, t, i] for P, T, i in df.itertuples(index=False)
for p in P for t in T
], columns=df.columns)
z = zip(df['Job position'], df['Job type'], df['id'])
pd.DataFrame([
[p, t, i] for P, T, i in z
for p in P for t in T
], columns=df.columns)
To generalize this solution to accommodate any number of columns
pd.DataFrame([
[p, t] + a for P, T, *a in df.values
for p in P for t in T
], columns=df.columns)
Job position Job type id
0 6 1 3
1 2 3 4
2 2 6 4
3 2 5 4
4 6 3 4
5 6 6 4
6 6 5 4
7 1 9 43