Reputation: 5828
How can we parse the output from DataFrame.describe()
? When we print the result of DataFrame.describe()
as shown in examples, it is in string format, which is why it is difficult to parse it.
I understand that the print
function might be converting the output into a displayable and readable form. However, it is not easily parseable. How can we achieve this?
Upvotes: 0
Views: 339
Reputation: 323
the output of describe()
is a dataframe so you can do:
df = x.describe()
df
is a standard DataFrame
Upvotes: 0
Reputation: 1614
print
always prints in string format.
But if you check type(df.describe())
then you'll see that it is a dataframe.
So you can treat it like one. :)
Upvotes: 1