Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/pandas/io/_util.py: 67%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

6 statements  

1from __future__ import annotations 

2 

3from pandas.compat._optional import import_optional_dependency 

4 

5import pandas as pd 

6 

7 

8def _arrow_dtype_mapping() -> dict: 

9 pa = import_optional_dependency("pyarrow") 

10 return { 

11 pa.int8(): pd.Int8Dtype(), 

12 pa.int16(): pd.Int16Dtype(), 

13 pa.int32(): pd.Int32Dtype(), 

14 pa.int64(): pd.Int64Dtype(), 

15 pa.uint8(): pd.UInt8Dtype(), 

16 pa.uint16(): pd.UInt16Dtype(), 

17 pa.uint32(): pd.UInt32Dtype(), 

18 pa.uint64(): pd.UInt64Dtype(), 

19 pa.bool_(): pd.BooleanDtype(), 

20 pa.string(): pd.StringDtype(), 

21 pa.float32(): pd.Float32Dtype(), 

22 pa.float64(): pd.Float64Dtype(), 

23 }