Dataframe.shape tuple index out of range

print "Boston housing dataset has {} data points with {} variables each.".format(df.shape)   

gives an error saying "tuple index out of range"

while

print "Boston housing dataset has {} data points with {} variables each.".format(*data.shape) 

outputs the dimension of the dataframe correctly. Can anyone explain why this happens?