Skip to content

Commit b355fc0

Browse files
MINOR: [Python][Documentation] Fix docstring of preserve_index in Schema.from_pandas (#37632)
### Rationale for this change The documentation of the `preserve_index` keyword does not match its default behavior. This PR updates it to match the behavior also described in `Table.from_pandas`. ### What changes are included in this PR? Updated documentation ### Are these changes tested? No, documentation only ### Are there any user-facing changes? Documentation only Lead-authored-by: Hendrik Makait <[email protected]> Co-authored-by: Alenka Frim <[email protected]> Signed-off-by: AlenkaF <[email protected]>
1 parent 052e0aa commit b355fc0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python/pyarrow/types.pxi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3116,12 +3116,12 @@ cdef class Schema(_Weakrefable):
31163116
Parameters
31173117
----------
31183118
df : pandas.DataFrame
3119-
preserve_index : bool, default True
3120-
Whether to store the index as an additional column (or columns, for
3121-
MultiIndex) in the resulting `Table`.
3122-
The default of None will store the index as a column, except for
3123-
RangeIndex which is stored as metadata only. Use
3124-
``preserve_index=True`` to force it to be stored as a column.
3119+
3120+
preserve_index : bool, optional
3121+
Whether to store the index as an additional field in the resulting
3122+
``Schema``. The default of None will store the index as a field,
3123+
except for RangeIndex which is stored as metadata only. Use
3124+
``preserve_index=True`` to force it to be stored as a field.
31253125
31263126
Returns
31273127
-------

0 commit comments

Comments
 (0)