@@ -1207,33 +1207,41 @@ def info_items(self) -> list[tuple[str, object]]:
12071207 spec = col_meta .spec if col_meta is not None else None
12081208 chunks = getattr (raw , "chunks" , None )
12091209 blocks = getattr (raw , "blocks" , None )
1210+
1211+ if self .is_list :
1212+ backend = "list"
1213+ elif self .is_varlen_scalar :
1214+ backend = "variable-length scalar"
1215+ elif self .is_dictionary :
1216+ backend = "dictionary"
1217+ else :
1218+ backend = "NDArray" if isinstance (raw , blosc2 .NDArray ) else type (raw ).__name__
1219+
1220+ # Virtual computed columns are not stored; otherwise report the table's
1221+ # storage kind, mirroring CTable.info's persistent/in-memory wording.
1222+ if self .is_computed :
1223+ storage = "computed"
1224+ elif isinstance (table ._storage , FileTableStorage ):
1225+ storage = "persistent"
1226+ else :
1227+ storage = "in-memory"
1228+
1229+ # Block order mirrors CTable.info: identity, shape/grid, sizes, content,
1230+ # then compression params.
12101231 items : list [tuple [str , object ]] = [
12111232 ("type" , self .__class__ .__name__ ),
12121233 ("name" , self ._col_name ),
1213- ("nrows" , len (self )),
1214- ("shape" , self .shape ),
1234+ ("dtype" , table ._dtype_info_label (self .dtype , spec )),
1235+ ("backend" , backend ),
1236+ ("storage" , storage ),
12151237 ]
1238+
1239+ items .append (("nrows" , len (self )))
1240+ items .append (("shape" , self .shape ))
12161241 if chunks is not None :
12171242 items .append (("chunks" , chunks ))
12181243 if blocks is not None :
12191244 items .append (("blocks" , blocks ))
1220- items .extend (
1221- [
1222- ("dtype" , table ._dtype_info_label (self .dtype , spec )),
1223- ("computed" , self .is_computed ),
1224- ("nullable" , self .null_value is not None or getattr (spec , "nullable" , False )),
1225- ]
1226- )
1227-
1228- if self .is_list :
1229- items .append (("storage" , "list" ))
1230- elif self .is_varlen_scalar :
1231- items .append (("storage" , "variable-length scalar" ))
1232- elif self .is_dictionary :
1233- items .append (("storage" , "dictionary" ))
1234- items .append (("dictionary_size" , len (raw .dictionary )))
1235- else :
1236- items .append (("storage" , "ndarray" if isinstance (raw , blosc2 .NDArray ) else type (raw ).__name__ ))
12371245
12381246 nbytes = getattr (raw , "nbytes" , None )
12391247 cbytes = getattr (raw , "cbytes" , None )
@@ -1243,11 +1251,12 @@ def info_items(self) -> list[tuple[str, object]]:
12431251 if cbytes is not None :
12441252 items .append (("cbytes" , format_nbytes_info (cbytes )))
12451253 if cratio is not None :
1246- items .append (("cratio" , f"{ cratio :.2f} " ))
1254+ items .append (("cratio" , f"{ cratio :.2f} x" ))
1255+
1256+ items .append (("nullable" , self .null_value is not None or getattr (spec , "nullable" , False )))
1257+ if self .is_dictionary :
1258+ items .append (("dictionary_size" , len (raw .dictionary )))
12471259
1248- urlpath = getattr (raw , "urlpath" , None )
1249- if urlpath is not None :
1250- items .append (("urlpath" , urlpath ))
12511260 cparams = getattr (raw , "cparams" , None )
12521261 dparams = getattr (raw , "dparams" , None )
12531262 if cparams is not None :
@@ -2568,7 +2577,7 @@ def info_items(self) -> list[tuple[str, object]]:
25682577 ("nrows" , self .nrows ),
25692578 ("nbytes" , format_nbytes_info (self .nbytes )),
25702579 ("cbytes" , format_nbytes_info (self .cbytes )),
2571- ("cratio" , f"{ self .cratio :.1f } x" ),
2580+ ("cratio" , f"{ self .cratio :.2f } x" ),
25722581 ("schema" , schema_summary ),
25732582 ]
25742583
@@ -9303,17 +9312,15 @@ def info_items(self) -> list[tuple[str, object]]:
93039312 items = [
93049313 ("type" , self .__class__ .__name__ ),
93059314 ("storage" , storage_type ),
9306- ("rows" , self .nrows ),
9307- ("columns" , self .ncols ),
93089315 ("view" , self .base is not None ),
9316+ ("nrows" , self .nrows ),
9317+ ("ncols" , self .ncols ),
9318+ ("chunks" , self .chunks if self .chunks is not None else "none (no fixed-size columns)" ),
9319+ ("blocks" , self .blocks if self .blocks is not None else "none (no fixed-size columns)" ),
93099320 ("nbytes" , format_nbytes_info (self .nbytes )),
93109321 ("cbytes" , format_nbytes_info (self .cbytes )),
9311- ("cratio" , f"{ self .cratio :.1f } x" ),
9322+ ("cratio" , f"{ self .cratio :.2f } x" ),
93129323 ("schema" , schema_summary ),
9313- (
9314- "valid_rows_mask" ,
9315- f"cbytes={ format_nbytes_info (self ._valid_rows .cbytes )} " ,
9316- ),
93179324 ("indexes" , index_summary if index_summary else "none" ),
93189325 ]
93199326 if urlpath is not None :
0 commit comments