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(
2377
2377
2378
2378
Describing the data, where data component is like ``orient='records'``.
2379
2379
2380
+ Note that If `orient='table'`, column names must be strings.
2381
+ Using numeric column names will raise a `ValueError`.
2382
+
2380
2383
date_format : {{None, 'epoch', 'iso'}}
2381
2384
Type of date conversion. 'epoch' = epoch milliseconds,
2382
2385
'iso' = ISO8601. The default depends on the `orient`. For
@@ -2446,6 +2449,10 @@ def to_json(
2446
2449
This stores the version of `pandas` used in the latest revision of the
2447
2450
schema.
2448
2451
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
+
2449
2456
Examples
2450
2457
--------
2451
2458
>>> from json import loads, dumps
You can’t perform that action at this time.
0 commit comments