Amazon Interview Question | What all information you get from describe() in python?

Question

And their basic definition

in progress 0
TheDataMonk 4 years 3 Answers 1058 views Grand Master 0

Answers ( 3 )

  1. 1)For Numerical values, you get the following
    count – The total no of rows
    unique – The no of unique values
    top – top is the most common value
    freq – freq is the frequency of the most common value
    mean – the avg of all the values in respective columns
    std – The standard deviation of that particular series
    min – minimum value of the series
    max – maximum value of the series
    25% – The value at 25th percentile
    50% – The value at 50th percentile
    75% – The value at 75th percentile

    You can change the value of these percentile according to your requirement
    by passing in adequate arguments in the describe() function.

    2) For object data type, it will contain
    -count
    -unique
    -top
    -freq

  2. The describe() function computes a summary of statistics pertaining to the DataFrame columns.

    This function gives the mean, std and IQR values. And, function excludes the character columns and given summary about numeric columns. ‘include’ is the argument which is used to pass necessary information regarding what columns need to be considered for summarizing. Takes the list of values; by default, ‘number’.

    object − Summarizes String columns
    number − Summarizes Numeric columns
    all − Summarizes all columns together (Should not pass it as a list value)

  3. Describe() function is used to commute statistics summary i.e, it gives mean, standard deviation, Inter Quartile range in DataFrames.

Leave an answer

Browse
Browse