@@ -210,27 +210,21 @@ def read(
210
210
211
211
to_pandas_kwargs = {}
212
212
if use_nullable_dtypes :
213
- if Version (self .api .__version__ ) >= Version ("0.16" ):
214
- import pandas as pd
215
-
216
- mapping = {
217
- self .api .int8 (): pd .Int8Dtype (),
218
- self .api .int16 (): pd .Int16Dtype (),
219
- self .api .int32 (): pd .Int32Dtype (),
220
- self .api .int64 (): pd .Int64Dtype (),
221
- self .api .uint8 (): pd .UInt8Dtype (),
222
- self .api .uint16 (): pd .UInt16Dtype (),
223
- self .api .uint32 (): pd .UInt32Dtype (),
224
- self .api .uint64 (): pd .UInt64Dtype (),
225
- self .api .bool_ (): pd .BooleanDtype (),
226
- self .api .string (): pd .StringDtype (),
227
- }
228
- to_pandas_kwargs ["types_mapper" ] = mapping .get
229
- else :
230
- raise ValueError (
231
- "'use_nullable_dtypes=True' is only supported for pyarrow >= 0.16 "
232
- f"({ self .api .__version__ } is installed"
233
- )
213
+ import pandas as pd
214
+
215
+ mapping = {
216
+ self .api .int8 (): pd .Int8Dtype (),
217
+ self .api .int16 (): pd .Int16Dtype (),
218
+ self .api .int32 (): pd .Int32Dtype (),
219
+ self .api .int64 (): pd .Int64Dtype (),
220
+ self .api .uint8 (): pd .UInt8Dtype (),
221
+ self .api .uint16 (): pd .UInt16Dtype (),
222
+ self .api .uint32 (): pd .UInt32Dtype (),
223
+ self .api .uint64 (): pd .UInt64Dtype (),
224
+ self .api .bool_ (): pd .BooleanDtype (),
225
+ self .api .string (): pd .StringDtype (),
226
+ }
227
+ to_pandas_kwargs ["types_mapper" ] = mapping .get
234
228
manager = get_option ("mode.data_manager" )
235
229
if manager == "array" :
236
230
to_pandas_kwargs ["split_blocks" ] = True # type: ignore[assignment]
0 commit comments