实际上转置是df.T http://pandas.pydata.org/pandas-docs/stable/reshaping.html#reshaping-and-pivot-tables Reshaping and Pivot Tables Reshaping by pivoting DataFrame objectsReshaping by stacking and unstacking Multiple LevelsMissing DataWith a MultiIndexReshaping by MeltCombining with stats and GroupByPivot tables Adding marginsCross tabulations NormalizationAdding MarginsTilingComputing indicator / dummy variablesFactorizing values