Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-sdk-testing.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Description
The Table class used to display and analyze tabular data. Unlike traditional spreadsheets, Tables support numerous types of data: scalar values, strings, numpy arrays, and most subclasses ofwandb.data_types.Media.
This means you can embed Images, Video, Audio, and other sorts of rich, annotated media
directly in Tables, alongside other traditional scalar values.
This class is the primary class used to generate W&B Tables
https://docs.wandb.ai/models/tables
Args
- columns:
- data:
- rows:
- dataframe:
- dtype:
- optional:
- allow_mixed_types:
- log_mode:
Methods
method add_column
Arguments
- name: (str) - the unique name of the column
- data: (list | np.array) - a column of homogeneous data
- optional: (bool) - if null-like values are permitted
method add_computed_columns
Arguments
- fn: A function which accepts one or two parameters, ndx (int) and row (dict), which is expected to return a dict representing new columns for that row, keyed by the new column names. -
ndxis an integer representing the index of the row. Only included ifinclude_ndxis set toTrue. -rowis a dictionary keyed by existing columns
method add_data
wandb.Table.MAX_ARTIFACT_ROWS.
The length of the data should match the length of the table column.
Arguments
- data:
method add_row
Table.add_data method instead.
Arguments
- row:
method captions
Arguments
- media_items:
method cast
Arguments
- col_name: The name of the column to cast.
- dtype: The target dtype.
- optional: If the column should allow Nones.
method file_is_set
method get_column
Arguments
- name: (str) - the name of the column
- convert_to: (str, optional)
method get_dataframe
pandas.DataFrame of the table.
method get_index
method init_from_json
WBValue from a JSON blob based on the class that created it.
Looks through all subclasses and tries to match the json obj with the class
which created it. It will then call that subclass’ from_json method.
Importantly, this function will set the return object’s source_artifact
attribute to the passed in source artifact. This is critical for artifact
bookkeeping. If you choose to create a wandb.Value via it’s from_json method,
make sure to properly set this artifact_source to avoid data duplication.
Arguments
- json_obj: A JSON dictionary to deserialize. It must contain a
_typekey. This is used to lookup the correct subclass to use. - source_artifact: An artifact which will hold any additional resources which were stored during the
to_jsonfunction.
method is_bound
method path_is_reference
Arguments
- path:
method to_data_array
method type_mapping
Return a map from_log_type to subclass. Used to lookup correct types for deserialization.
method with_suffix
Arguments
- name: the name of the file
- filetype: the filetype to use. Defaults to “json”.