File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2377,6 +2377,9 @@ def to_json(
23772377
23782378 Describing the data, where data component is like ``orient='records'``.
23792379
2380+ Note that If `orient='table'`, column names must be strings.
2381+ Using numeric column names will raise a `ValueError`.
2382+
23802383 date_format : {{None, 'epoch', 'iso'}}
23812384 Type of date conversion. 'epoch' = epoch milliseconds,
23822385 'iso' = ISO8601. The default depends on the `orient`. For
@@ -2446,6 +2449,10 @@ def to_json(
24462449 This stores the version of `pandas` used in the latest revision of the
24472450 schema.
24482451
2452+ When using ``orient='table'``, column names must be strings due to JSON
2453+ requiring string keys. If column names are numeric (integers or floats),
2454+ a `ValueError` will be raised.
2455+
24492456 Examples
24502457 --------
24512458 >>> from json import loads, dumps
You can’t perform that action at this time.
0 commit comments