Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: fix PR07,RT03,SA01,ES01 for pandas.io.json.build_table_schema #60571

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.resample.Resampler.var SA01" \
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.plotting.scatter_matrix PR07,SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
Expand Down
15 changes: 14 additions & 1 deletion pandas/io/json/_table_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,16 @@ def build_table_schema(
"""
Create a Table schema from ``data``.

This method is a utility to generate a JSON-serializable schema
representation of a pandas Series or DataFrame, compatible with the
Table Schema specification. It enables structured data to be shared
and validated in various applications, ensuring consistency and
interoperability.

Parameters
----------
data : Series, DataFrame
data : Series or DataFrame
The input data for which the table schema is to be created.
index : bool, default True
Whether to include ``data.index`` in the schema.
primary_key : bool or None, default True
Expand All @@ -256,6 +263,12 @@ def build_table_schema(
Returns
-------
dict
A dictionary representing the Table schema.

See Also
--------
DataFrame.to_json : Convert the object to a JSON string.
read_json : Convert a JSON string to pandas object.

Notes
-----
Expand Down
Loading