127. Concatenate with Hierarchical Keys

Medium

Stack df1 on top of df2 into one DataFrame with a two-level row index: an outer level labeling which original DataFrame each row came from ("first" for df1's rows, "second" for df2's rows) and an inner level keeping each row's original index value.

Sample data: df1:

  name  score
0    A      1
1    B      2

df2:

  name  score
0    C      3
1    D      4
Implement solve(...)