pandas swapaxes example

Solutions on MaxInterview for pandas swapaxes example by the best coders in the world

showing results for - "pandas swapaxes example"
Helena
08 Jun 2017
1import pandas as pd
2df = pd.DataFrame({"A":[10, 11, 7, 8, 5], 
3                   "B":[21, 5, 32, 4, 6], 
4                   "C":[11, 21, 23, 7, 9], 
5                   "D":[1, 5, 3, 8, 6]},  
6                   index =["A1", "A2", "A3", "A4", "A5"])
7dataframe.swapaxes(axis1="index", axis2="columns")