I'm trying to see what type each column in my dataframe is in python, so I run the following:df.dtype
What it returns to me (in spyder):
Out[7]:
ID int64
NUMERO_CUESTIONARIO int64
OLA int64
AEROPUERTO_ORIGEN object
PAIS_DESTINO object
SITUACION_LABORAL int64
INGRESOS int64
PERSONAS_HOGAR int64
TRIMESTRE object
PESO object
Length: 175, dtype: object
But my dataframe contains many more columns than what appears in the output, so I would like the output to show all the columns and not just the 10 that appear in the output.
How can I display all columns and their types with dtype
?
You see fewer columns because of the configuration that pandas has when importing it. You can set when importing:
...and then df.dtypes should show all the columns.