File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 53
53
floating ,
54
54
integer ,
55
55
interval ,
56
- list ,
56
+ list_dtype ,
57
57
map ,
58
58
period ,
59
59
sparse ,
326
326
"isna" ,
327
327
"isnull" ,
328
328
"json_normalize" ,
329
- "list " ,
329
+ "list_dtype " ,
330
330
"lreshape" ,
331
331
"map" ,
332
332
"melt" ,
Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ def boolean(
314
314
return ArrowDtype (pa .bool_ ())
315
315
316
316
317
- def list (
317
+ def list_dtype (
318
318
value_type : Any = None ,
319
319
large : bool = False ,
320
320
backend : Literal ["numpy" , "pyarrow" ] = "numpy" ,
@@ -339,13 +339,13 @@ def list(
339
339
340
340
Examples
341
341
--------
342
- >>> list () # Default numpy backend
342
+ >>> list_dtype () # Default numpy backend
343
343
object
344
- >>> list (backend="pyarrow") # PyArrow backend with default int64
344
+ >>> list_dtype (backend="pyarrow") # PyArrow backend with default int64
345
345
list[int64][pyarrow]
346
- >>> list (value_type=pa.string(), backend="pyarrow") # PyArrow with string
346
+ >>> list_dtype (value_type=pa.string(), backend="pyarrow") # PyArrow with string
347
347
list[string][pyarrow]
348
- >>> list (
348
+ >>> list_dtype (
349
349
... value_type=pa.string(), large=True, backend="pyarrow"
350
350
... ) # PyArrow large list
351
351
large_list[string][pyarrow]
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ class TestPDApi(Base):
128
128
"interval_range" ,
129
129
"isna" ,
130
130
"isnull" ,
131
- "list " ,
131
+ "list_dtype " ,
132
132
"lreshape" ,
133
133
"map" ,
134
134
"melt" ,
Original file line number Diff line number Diff line change 18
18
floating ,
19
19
integer ,
20
20
interval ,
21
- list ,
21
+ list_dtype ,
22
22
map ,
23
23
period ,
24
24
sparse ,
@@ -165,21 +165,21 @@ def test_boolean_pyarrow():
165
165
166
166
# List
167
167
def test_list_default ():
168
- result = list ()
168
+ result = list_dtype ()
169
169
assert result == np .dtype ("object" )
170
170
assert isinstance (result , np .dtype )
171
171
172
172
173
173
def test_list_pyarrow ():
174
174
pa = pytest .importorskip ("pyarrow" )
175
- result = list (backend = "pyarrow" , value_type = pa .int64 ())
175
+ result = list_dtype (backend = "pyarrow" , value_type = pa .int64 ())
176
176
assert isinstance (result , ArrowDtype )
177
177
assert str (result ) == "list<item: int64>[pyarrow]"
178
178
179
179
180
180
def test_list_large ():
181
181
pa = pytest .importorskip ("pyarrow" )
182
- result = list (backend = "pyarrow" , value_type = pa .string (), large = True )
182
+ result = list_dtype (backend = "pyarrow" , value_type = pa .string (), large = True )
183
183
assert isinstance (result , ArrowDtype )
184
184
assert str (result ) == "large_list<item: string>[pyarrow]"
185
185
You can’t perform that action at this time.
0 commit comments