I have a sample of data:
d = {'name': ['Alice', 'Bob'], 'score': [9.5, 8], 'kids': [1, 2]}
I want to display simple statistics of the dataset in pandas using describe()
method.
df = pd.DataFrame(data=d)
print(df.describe().transpose())
Output 1:
Is there any difference between the two workflows when I am ending up with the same result?
df = pd.DataFrame(data=d)
print(df.describe().T)
Output 2:
References: