April 2019
Intermediate to advanced
426 pages
11h 13m
English
The describe() method of pandas gives us a summary statistic and distribution of values inside each column of the pandas DataFrame object:
In [ ]: df.describe()
This gives us the following table:
|
SPX |
|
|---|---|
|
count |
4734.000000 |
|
mean |
1493.538998 |
|
std |
500.541938 |
|
min |
676.530000 |
|
25% |
1140.650000 |
|
50% |
1332.730000 |
|
75% |
1840.515000 |
|
max |
2930.750000 |
Another related method, info(), used earlier, gives us a technical summary of the DataFrame, such as the range of the index and memory usage:
In [ ]: df.info()Out[ ]: <class 'pandas.core.frame.DataFrame'> DatetimeIndex: 4734 entries, 2000-01-03 to 2018-10-24 Data columns (total 2 columns): SPX 4734 non-null float64 VIX 4734 ...
Read now
Unlock full access