Created
March 24, 2020 11:50
-
-
Save allatambov/5281c4f22485e312d8fad7873af526d2 to your computer and use it in GitHub Desktop.
This file contains 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
import pandas as pd | |
hp = pd.read_excel("HP_one.xlsx") | |
hp.head() | |
hp_pivot = hp.pivot_table(index='Name', columns='Subject', values = 'Mark') | |
hp_pivot | |
hp.pivot(index='Name', columns='Subject', values = 'Mark') | |
hp_pivot.index | |
hp_pivot.columns | |
hp.pivot_table(index='Name') | |
hp.pivot_table(index='Name', columns='Subject') | |
hp_pivot.loc["Ronald Weasley", 'Potions'] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment