Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)

I would show all data of my data frame which contains in excess of 100 columns with .data() from panda yet it will not : 

data_train.info()

<class 'pandas.core.frame.DataFrame'>

RangeIndex: 85529 entries, 0 to 85528

Columns: 110 entries, ID to TARGET

dtypes: float64(40), int64(19), object(51)

memory usage: 71.8+ MB

I might want it shows this way : 

data_train.info()

<class 'pandas.core.frame.DataFrame'>

RangeIndex: 10886 entries, 0 to 10885

Data columns (total 12 columns):

datetime      10886 non-null object

season        10886 non-null int64

holiday       10886 non-null int64

workingday    10886 non-null int64

weather       10886 non-null int64

temp          10886 non-null float64

atemp         10886 non-null float64

humidity      10886 non-null int64

windspeed     10886 non-null float64

casual        10886 non-null int64

registered    10886 non-null int64

count         10886 non-null int64

dtypes: float64(3), int64(8), object(1)

memory usage: 1020.6+ KB

Yet, the issue is by all accounts the high number of columns from my past information outline. 

Is there an approach to fix that?

Thank you

In case, if there are non-null values, it doesn't show, even if it works.

data_train.info(verbose=True)

<class 'pandas.core.frame.DataFrame'>

RangeIndex: 85529 entries, 0 to 85528

Data columns (total 110 columns):

ID           int64

COD_INSEE    float64

COD_IRIS     float64

C1           object

C2           object

C3           object

C4           object

C5           int64

C6           int64

C7           int64

C8           object

C9           object

C10          int64

C11          int64

C12          object

C13          object

C14          object

C15          int64

C16          int64

C17          int64

C18          int64

C19          int64

S1           float64

S2           int64

S3           object

S4           object

S5           object

S6           object

S7           object

S8           int64

S9           int64

S10          int64

S11          int64

S12          int64

Q1           object

Q2           object

Q3           object

Q4           float64

Q5           int64

Q6           float64

Q7           object

Q8           float64

Q9           float64

Q10          object

Q11          object

Q12          object

Q13          float64

Q14          float64

Q15          float64

Q16          object

Q17          float64

Q18          float64

Q19          float64

Q20          float64

Q21          float64

Q22          float64

Q23          float64

Q24          float64

Q25          float64

Q26          float64

Q27          float64

Q28          object

Q29          object

Q30          float64

Q31          float64

Q32          object

Q33          float64

Q34          object

Q35          float64

Q36          object

Q37          float64

Q38          float64

Q39          object

Q40          float64

Q41          float64

Q42          float64

Q43          float64

Q44          float64

Q45          float64

Q46          float64

Q47          float64

Q48          float64

Q49          float64

Q50          float64

Q51          float64

Q52          float64

Q53          object

Q54          object

Q55          object

Q56          object

Q57          object

Q58          object

Q59          object

Q60          object

Q61          object

Q62          object

Q63          object

Q64          object

Q65          object

Q66          object

Q67          object

Q68          object

Q69          object

Q70          object

Q71          object

Q72          object

Q73          object

Q74          object

Q75          object

TARGET       int64

dtypes: float64(40), int64(19), object(51)

memory usage: 71.8+ MB

1 Answer

0 votes
by (26.4k points)

You can pass discretionary (Optional) arguments verbose=True and null_counts=True to the .info() technique to yield data for the entirety of the columns

data_train.info(verbose=True, null_counts=True)

Are you pretty much interested to learn python in detail? Come and join the python training course to gain more knowledge.

Related questions

Browse Categories

...