2
$\begingroup$
import pandas as pd;
dataSet = pd.read_csv("winequality-red.csv");
dataSet.describe(include = 'all');

When view data set as data frame ,it show empty table.But when printing dataSet,I get following result.

<class 'pandas.core.frame.DataFrame'>
RangeIndex: 1599 entries, 0 to 1598
Data columns (total 12 columns):
fixed acidity           1599 non-null float64
volatile acidity        1599 non-null float64
citric acid             1599 non-null float64
residual sugar          1599 non-null float64
chlorides               1599 non-null float64
free sulfur dioxide     1599 non-null float64
total sulfur dioxide    1599 non-null float64
density                 1599 non-null float64
pH                      1599 non-null float64
sulphates               1599 non-null float64
alcohol                 1599 non-null float64
quality                 1599 non-null int64
dtypes: float64(11), int64(1)
memory usage: 150.0 KB
Backend TkAgg is interactive backend. Turning interactive mode on.
<class 'pandas.core.frame.DataFrame'>
$\endgroup$

2 Answers 2

0
$\begingroup$

Welcome to the site! Instead of describe, try print(dataSet.head()) and that should show you some of the data in your dataframe.

$\endgroup$
2
  • $\begingroup$ that works.but I want to get the count,mean,max,std like details using describe() $\endgroup$
    – KHK
    Feb 27, 2019 at 16:58
  • $\begingroup$ @KHK That doesn't mean you still can't get it via other ways - Pandas supports all of the functions you mentioned. $\endgroup$ Feb 27, 2019 at 16:59
0
$\begingroup$

After importing the pandas library and reading the input data set,to get the statistical summary such as mean,max,count,standard deviation. Run the Project File and Execute the below commands in Python Console Window to obtain the results. Please refer the screenshots for reference.

Commands:

Option 1: dataSet.describe() or Option 2: dataSet.describe(include='all')Output Screensot

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.