Pandas 'describe' is not returning summary of all columns

后端 未结 6 1976
野的像风
野的像风 2020-12-23 16:16

I am running \'describe()\' on a dataframe and getting summaries of only int columns (pandas 14.0).

The documentation says that for object columns frequency of most

6条回答
  •  庸人自扰
    2020-12-23 16:49

    You can execute df_test.info() to get the list of datatypes your data frame contains.If your data frame contains only numerical columns than df_test.describe() will work perfectly fine.As by default, it provides the summary of numerical values. If you want the summary of your Object(String) features you can use df_test.describe(include=['O']).

    Or in short, you can just use df_test.describe(include='all') to get summary of all the feature columns when your data frame has columns of various data types.

提交回复
热议问题