The report presents the profile of each column as one row of a table: the column’s name and type, the number and fraction of missing and distinct values, and its statistics. It’s the quickest way to get an overview of a table you haven’t seen before, and it’s what col_summary_tbl() returns.
Each row starts with an icon for the column’s type. The NA and Unique columns give the number of missing values and the number of distinct values, each with its fraction of the rows below it. Statistics that don’t apply to any column are left out, and those that don’t apply to a particular column are shown as an em dash (—). Statistics for string columns describe the lengths of the strings (as the note below the table says). For date, datetime and time columns, Min and Max give the earliest and latest values, with the date and the time on lines of their own; the time is shown to the second, and hovering over a value shows it in full. Boolean columns show the percentages of True and False values in place of the number of distinct values. Columns of unsupported types are listed with an unsupported type badge and no statistics.
Parameters
show_sample_data:bool=False
Should a column with the first five non-missing values of each column be added? This is off by default, since the values can be long, and the table may hold sensitive data.
Returns
GT
A Great Tables object.
Examples
Let’s scan the game_revenue dataset and look at the report.
import pointblank as pbgame_revenue = pb.load_dataset(dataset="game_revenue", tbl_type="polars")scan = pb.DataScan(game_revenue, tbl_name="game_revenue")scan.get_tabular_report()
Polarsgame_revenueRows2,000Columns11
Column
NA
Unique
Mean
SD
Min
P5
Q1
Med
Q3
P95
Max
IQR
player_id
String
0 0
76 0.04
15
0
15
15
15
15
15
15
15
0
session_id
String
0 0
618 0.31
24
0
24
24
24
24
24
24
24
0
session_start
Datetime(time_unit='us', time_zone='UTC')
0 0
618 0.31
—
—
2015-01-01
01:31:03
—
—
—
—
—
2015-01-21
03:59:23
—
time
Datetime(time_unit='us', time_zone='UTC')
0 0
1989 0.99
—
—
2015-01-01
01:31:27
—
—
—
—
—
2015-01-21
04:06:29
—
item_type
String
0 0
2 <.01
2.22
0.42
2
2
2
2
2
3
3
0
item_name
String
0 0
24 0.01
7.35
1.27
5
5
7
8
8
9
11
1
item_revenue
Float64
0 0
508 0.25
4.34
13.21
0
0.02
0.09
0.38
1.25
21.99
142.99
1.16
session_duration
Float64
0 0
310 0.15
25.63
9.55
3.2
8.2
18.5
26.5
33.82
39.5
41
15.32
start_day
Date
0 0
20 0.01
—
—
2015-01-01
—
—
—
—
—
2015-01-21
—
acquisition
String
0 0
6 <.01
7.97
2.54
5
6
7
7
8
14
14
1
country
String
0 0
23 0.01
8.53
3.13
5
5
6
7
12
13
14
6
For string columns, the statistics describe the lengths of the strings.
The header shows the table type and its dimensions. In the rows, item_revenue has a long right tail (its 95th percentile is far below its maximum), and the string columns player_id and session_id have fixed lengths. To see what the values look like, add the sample data:
For string columns, the statistics describe the lengths of the strings.
The samples make it clear that player_id and session_id are codes, and they show the format of each column’s values. The report is a Great Tables object, so it can be saved to a standalone HTML file with its write_raw_html() method.