Skip to content

Commit ae226b4

Browse files
committed
Only run doctests on pandas 3, update doctest for pandas 3
1 parent f0de008 commit ae226b4

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

.github/workflows/python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ jobs:
6969
- conda-python-3.12-no-numpy
7070
include:
7171
- name: conda-python-docs
72-
cache: conda-python-3.10
72+
cache: conda-python-3.11
7373
image: conda-python-docs
74-
title: AMD64 Conda Python 3.10 Sphinx & Numpydoc
75-
python: "3.10"
74+
title: AMD64 Conda Python 3.11 Sphinx & Numpydoc
75+
python: "3.11"
7676
- name: conda-python-3.11-nopandas
7777
cache: conda-python-3.11
7878
image: conda-python

docs/source/python/data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ When using :class:`~.DictionaryArray` with pandas, the analogue is
684684
6 NaN
685685
7 baz
686686
dtype: category
687-
Categories (3, object): ['foo', 'bar', 'baz']
687+
Categories (3, str): ['foo', 'bar', 'baz']
688688
689689
.. _data.record_batch:
690690

docs/source/python/ipc.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ DataFrame output:
160160
>>> with pa.ipc.open_file(buf) as reader:
161161
... df = reader.read_pandas()
162162
>>> df[:5]
163-
f0 f1 f2
164-
0 1 foo True
165-
1 2 bar None
166-
2 3 baz False
167-
3 4 None True
168-
4 1 foo True
163+
f0 f1 f2
164+
0 1 foo True
165+
1 2 bar None
166+
2 3 baz False
167+
3 4 NaN True
168+
4 1 foo True
169169
170170
Efficiently Writing and Reading Arrow Data
171171
------------------------------------------

docs/source/python/pandas.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ number of possible values.
170170
171171
>>> df = pd.DataFrame({"cat": pd.Categorical(["a", "b", "c", "a", "b", "c"])})
172172
>>> df.cat.dtype.categories
173-
Index(['a', 'b', 'c'], dtype='object')
173+
Index(['a', 'b', 'c'], dtype='str')
174174
>>> df
175175
cat
176176
0 a
@@ -182,7 +182,7 @@ number of possible values.
182182
>>> table = pa.Table.from_pandas(df)
183183
>>> table
184184
pyarrow.Table
185-
cat: dictionary<values=string, indices=int8, ordered=0>
185+
cat: dictionary<values=large_string, indices=int8, ordered=0>
186186
----
187187
cat: [ -- dictionary:
188188
["a","b","c"] -- indices:
@@ -196,7 +196,7 @@ same categories of the Pandas DataFrame.
196196
>>> column = table[0]
197197
>>> chunk = column.chunk(0)
198198
>>> chunk.dictionary
199-
<pyarrow.lib.StringArray object at ...>
199+
<pyarrow.lib.LargeStringArray object at ...>
200200
[
201201
"a",
202202
"b",
@@ -224,7 +224,7 @@ use the ``datetime64[ns]`` type in Pandas and are converted to an Arrow
224224
225225
>>> df = pd.DataFrame({"datetime": pd.date_range("2020-01-01T00:00:00Z", freq="h", periods=3)})
226226
>>> df.dtypes
227-
datetime datetime64[ns, UTC]
227+
datetime datetime64[us, UTC]
228228
dtype: object
229229
>>> df
230230
datetime
@@ -234,9 +234,9 @@ use the ``datetime64[ns]`` type in Pandas and are converted to an Arrow
234234
>>> table = pa.Table.from_pandas(df)
235235
>>> table
236236
pyarrow.Table
237-
datetime: timestamp[ns, tz=UTC]
237+
datetime: timestamp[us, tz=UTC]
238238
----
239-
datetime: [[2020-01-01 00:00:00.000000000Z,...,2020-01-01 02:00:00.000000000Z]]
239+
datetime: [[2020-01-01 00:00:00.000000Z,2020-01-01 01:00:00.000000Z,2020-01-01 02:00:00.000000Z]]
240240
241241
In this example the Pandas Timestamp is time zone aware
242242
(``UTC`` on this case), and this information is used to create the Arrow

docs/source/python/parquet.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ concatenate them into a single table. You can read individual row groups with
238238
>>> parquet_file.read_row_group(0)
239239
pyarrow.Table
240240
one: double
241-
two: string
241+
two: large_string
242242
three: bool
243-
__index_level_0__: string
243+
__index_level_0__: large_string
244244
----
245245
one: [[-1,null,2.5]]
246246
two: [["foo","bar","baz"]]
@@ -352,7 +352,7 @@ and improved performance for columns with many repeated string values.
352352
one: double
353353
two: dictionary<values=string, indices=int32, ordered=0>
354354
three: bool
355-
__index_level_0__: string
355+
__index_level_0__: large_string
356356
----
357357
one: [[-1,null,2.5]]
358358
two: [ -- dictionary:

0 commit comments

Comments
 (0)