Skip to content

Commit

Permalink
DOC: fix PR07,RT03,SA01,ES01 for pandas.io.json.build_table_schema (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
tuhinsharma121 authored Dec 16, 2024
1 parent 43ed81f commit 57981d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
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.tseries.offsets.BDay PR02,SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
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

0 comments on commit 57981d2

Please sign in to comment.