Skip to content

Commit cf81d79

Browse files
committed
move new logic description from IO docs to to_json docstring
1 parent 2144628 commit cf81d79

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

doc/source/user_guide/io.rst

-2
Original file line numberDiff line numberDiff line change
@@ -2287,8 +2287,6 @@ Please note that the literal string 'index' as the name of an :class:`Index`
22872287
is not round-trippable, nor are any names beginning with ``'level_'`` within a
22882288
:class:`MultiIndex`. These are used by default in :func:`DataFrame.to_json` to
22892289
indicate missing values and the subsequent read cannot distinguish the intent.
2290-
The string 'index' as a column name with empty :class:`Index` or if it is
2291-
'index' will raise a ``ValueError``.
22922290

22932291
.. ipython:: python
22942292
:okwarning:

pandas/core/generic.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2388,7 +2388,8 @@ def to_json(
23882388
index : bool or None, default None
23892389
The index is only used when 'orient' is 'split', 'index', 'column',
23902390
or 'table'. Of these, 'index' and 'column' do not support
2391-
`index=False`.
2391+
`index=False`. The string 'index' as a column name with empty :class:`Index`
2392+
or if it is 'index' will raise a ``ValueError``.
23922393
23932394
indent : int, optional
23942395
Length of whitespace used to indent each record.

0 commit comments

Comments
 (0)