I would like to kind append/concatenate two unrelated data frames in the way I show as follows:
Input Table 1
| col1 |
|---|
| 1 |
| 2 |
Table 2
| col1 |
|---|
| A |
| B |
Expected result
| col1 | col |
|---|---|
| 1 | A |
| 1 | B |
| 2 | A |
| 2 | B |
Does exist any function to do that? or it's only possible only with for loops?
CodePudding user response:
you can use pandas dataframe.concat see the documentation https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html
