| df_schema | R Documentation |
df_schema() gives a column-by-column description of a data frame. For
each column, it gives the name, type, label (if present), and number of
missing values. For numeric and date/time columns, it also gives the
range. For character and factor columns, it also gives the number of unique
values, and if there's only a few (<= 10), their values.
The goal is to give the LLM a sense of the structure of the data, so that it can generate useful code, and the output attempts to balance between conciseness and accuracy.
df_schema(df, max_cols = 50)
df |
A data frame to describe. |
max_cols |
Maximum number of columns to includes. Defaults to 50 to avoid accidentally generating very large prompts. |
df_schema(mtcars)
df_schema(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.