Created
January 29, 2021 01:18
-
-
Save deanjamesss/b424b587914a72986dd6cca37f21aa7c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Unpivot the original DataFrame. | |
| df = df.melt(id_vars=['staff_no', 'name'], var_name='year', | |
| value_name='hours') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment