File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,37 @@ including other versions of pandas.
14
14
Enhancements
15
15
~~~~~~~~~~~~
16
16
17
+ .. _whatsnew_150.enhancements.arrow :
18
+
19
+ Native PyArrow-backed ExtensionArray
20
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
21
+
22
+ With `Pyarrow <https://arrow.apache.org/docs/python/index.html >`__ installed, users can now create pandas objects
23
+ that are backed by a ``pyarrow.ChunkedArray `` and ``pyarrow.DataType ``.
24
+
25
+ The ``dtype `` argument can accept a string of a `pyarrow data type <https://arrow.apache.org/docs/python/api/datatypes.html >`__
26
+ with ``pyarrow `` in brackets e.g. ``int64[pyarrow] `` or, for pyarrow data types that take parameters, a :class: `ArrowDtype `
27
+ initialized with a ``pyarrow.DataType ``
28
+
29
+ .. ipython :: python
30
+
31
+ import pyarrow as pa
32
+ ser_float = pd.Series([1.0 , 2.0 , None ], dtype = " float32[pyarrow]" )
33
+ ser_float
34
+
35
+ ser_list = pd.Series([[1 , 2 ]], dtype = pd.ArrowDtype(pa.list_(pa.int64())))
36
+ ser_list
37
+
38
+ Most operations are supported and have been implemented using `pyarrow compute <https://arrow.apache.org/docs/python/api/compute.html >`__ functions.
39
+ We recommend installing the latest version of PyArrow to access the most recently implemented compute functions.
40
+
41
+ .. ipython :: python
42
+
43
+ ser_list.take([0 , 0 ])
44
+ ser_float * 5
45
+ ser_float.mean()
46
+ ser_float.dropna()
47
+
17
48
.. _whatsnew_150.enhancements.dataframe_exchange :
18
49
19
50
DataFrame exchange protocol implementation
You can’t perform that action at this time.
0 commit comments