[英]How to show all dataframe datatypes of too many columns in pandas
I have a dataframe consists of 115 columns and I need to show the datatypes and null values using df.info(), but when using the code I got the following:我有一个 dataframe 由 115 列组成,我需要使用 df.info() 显示数据类型和 null 值,但是使用代码时我得到以下信息:
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 25979 entries, 0 to 25978
Columns: 115 entries, id to BSA
dtypes: float64(96), int64(9), object(10)
memory usage: 22.8+ MB
is there a way to show all columns details?有没有办法显示所有列的详细信息?
df is pandas dataframe df 是 pandas dataframe
dataTypeSeries = df.dtypes
As per Pandas documentation , "display.large_repr lets you select whether to display dataframes that exceed max_columns or max_rows as a truncated frame, or as a summary."根据Pandas 文档, “display.large_repr 让您 select 是否将超过 max_columns 或 max_rows 的数据帧显示为截断帧或摘要。”
So, you could try this:所以,你可以试试这个:
>>> pd.set_option("large_repr", "info")
>>> df
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.