0

I imported my file using pandas and now I want a description of the data-set. I used describe() function but It is showing 4 features first two and last two what should I do for seeing complete description.

here is a part of my code-

    import pandas as pd

    header_names = ['age','sex','cp','trestbps','chol','fbs','restecg','thalach','exang','oldpeak','slope','ca','thal','num']
    dataset = pd.read_csv('E:/HCU proj doc/EHR dataset/cleveland_data.csv', names= header_names)

    print(dataset.describe())

output-

        [Command: python -u 'E:\HCU proj doc\heart_disease_data.py']
              age         sex     ...           slope         num
count  303.000000  303.000000     ...      303.000000  303.000000
mean    54.438944    0.679868     ...        1.600660    0.937294
std      9.038662    0.467299     ...        0.616226    1.228536
min     29.000000    0.000000     ...        1.000000    0.000000
25%     48.000000    0.000000     ...        1.000000    0.000000
50%     56.000000    1.000000     ...        2.000000    0.000000
75%     61.000000    1.000000     ...        2.000000    2.000000
max     77.000000    1.000000     ...        3.000000    4.000000

[8 rows x 12 columns]
[Finished in 5.809s]
Nabin
  • 11,216
  • 8
  • 63
  • 98
Sri991
  • 381
  • 1
  • 4
  • 17
  • This is how it is. Happens in any terminal – Nabin Jul 02 '18 at 11:29
  • Possible duplicate of [Python pandas, how to widen output display to see more columns?](https://stackoverflow.com/questions/11707586/python-pandas-how-to-widen-output-display-to-see-more-columns) – kvoki Jul 02 '18 at 11:33

1 Answers1

1

try below command:

pd.set_option('display.max_colwidth', None)
Sociopath
  • 13,068
  • 19
  • 47
  • 75