I have a data change history table. It is a form in which various ids, values, and creation time are stamped, but I want to convert it to the following form.
as-is table
| user_id | admin_id | school | major | phone number | created_at | updated_at |
|---|---|---|---|---|---|---|
| 111 | 123 | abc school | computer science | 123456789 | 2021-07-28 | 2021-07-29 |
| 111 | 123 | abc school | bio information | 123456789 | 2021-08-18 | 2021-08-18 |
to-be table
| user_id | admin_id | school | major | phone number | created_at | updated_at | user_id | admin_id | school | major | phone number | created_at | updated_at |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 111 | 123 | abc school | computer science | 123456789 | 2021-07-28 | 2021-07-29 | 111 | 123 | abc school | bio information | 123456789 | 2021-08-18 | 2021-08-18 |
How can I do it using python and pandas?