File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2378,7 +2378,7 @@ def to_json(
2378
2378
Describing the data, where data component is like ``orient='records'``.
2379
2379
2380
2380
Note that If `orient='table'`, column names must be strings.
2381
- Using numeric column names will raise a `ValueError`.
2381
+ Using non string column names will raise a `ValueError`.
2382
2382
2383
2383
date_format : {{None, 'epoch', 'iso'}}
2384
2384
Type of date conversion. 'epoch' = epoch milliseconds,
@@ -2450,7 +2450,7 @@ def to_json(
2450
2450
schema.
2451
2451
2452
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) ,
2453
+ requiring string keys. If column names are anything other than string ,
2454
2454
a `ValueError` will be raised.
2455
2455
2456
2456
Examples
@@ -2594,7 +2594,7 @@ def to_json(
2594
2594
2595
2595
if orient == "table" :
2596
2596
if hasattr (self , "columns" ) and any (
2597
- isinstance (col , ( int , float ) ) for col in self .columns
2597
+ not isinstance (col , str ) for col in self .columns
2598
2598
):
2599
2599
raise ValueError (
2600
2600
"Column names must be strings for JSON serialization with "
You can’t perform that action at this time.
0 commit comments