Examples
Square DataFrame with homogeneous dtype:

In [1]:
import numpy as np
import pandas as pd
In [2]:
d1 = {'c1': [2, 3], 'c2': [4, 5]}
df1 = pd.DataFrame(data=d1)
df1
Out[2]:
c1 c2
0 2 4
1 3 5

Pandas: DataFrame - transpose.

In [3]:
df1_transposed = df1.T # or df1.transpose()
df1_transposed
Out[3]:
0 1
c1 2 3
c2 4 5

Pandas: DataFrame - transpose.

When the dtype is homogeneous in the original DataFrame, we get a transposed
DataFrame with the same dtype:

In [4]:
df1.dtypes
Out[4]:
c1    int64
c2    int64
dtype: object
In [5]:
df1_transposed.dtypes
Out[5]:
0    int64
1    int64
dtype: object

Non-square DataFrame with mixed dtypes:

In [6]:
d2 = {'name': ['Jimmy', 'Monty'],
      'score': [10.5, 9],
      'employed': [False, True],
      'kids': [0, 0]}
df2 = pd.DataFrame(data=d2)
df2
Out[6]:
name score employed kids
0 Jimmy 10.5 False 0
1 Monty 9.0 True 0
In [7]:
df2_transposed = df2.T # or df2.transpose()
df2_transposed
Out[7]:
0 1
name Jimmy Monty
score 10.5 9
employed False True
kids 0 0

When the DataFrame has mixed dtypes, we get a transposed DataFrame
with the object dtype:

In [8]:
df2.dtypes
Out[8]:
name         object
score       float64
employed       bool
kids          int64
dtype: object
In [9]:
df2_transposed.dtypes
Out[9]:
0    object
1    object
dtype: object