File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -849,6 +849,26 @@ def missing_vals_tbl(data: FrameT | Any) -> GT:
849
849
rows, and so on. Any sectors that are light blue indicate that there are no missing values in
850
850
that sector. If there are missing values, the proportion of missing values is shown by a gray
851
851
color (light gray for low proportions, dark gray to black for very high proportions).
852
+
853
+ Examples
854
+ --------
855
+ The `missing_vals_tbl()` function is useful for quickly identifying columns with missing values
856
+ in a table. Here's an example using the `nycflights` dataset (loaded using the `load_dataset()`
857
+ function as a Polars DataFrame):
858
+
859
+ ```{python}
860
+ import pointblank as pb
861
+
862
+ nycflights = pb.load_dataset("nycflights", tbl_type="polars")
863
+
864
+ pb.missing_vals_tbl(nycflights)
865
+ ```
866
+
867
+ The table shows the proportion of missing values in each column of the `nycflights` dataset. The
868
+ table is divided into sectors, with each sector representing a range of rows in the table (with
869
+ around 34,000 rows per sector). The proportion of missing values in each sector is calculated
870
+ for each column. The various shades of gray indicate the proportion of missing values in each
871
+ sector. Many columns have no missing values at all, and those sectors are colored light blue.
852
872
"""
853
873
854
874
# Make a copy of the data to avoid modifying the original
You can’t perform that action at this time.
0 commit comments