File tree Expand file tree Collapse file tree 3 files changed +19
-56
lines changed Expand file tree Collapse file tree 3 files changed +19
-56
lines changed Original file line number Diff line number Diff line change 12
12
13
13
class DataFrame :
14
14
"""
15
- A DataFrame.
15
+ DataFrame object
16
16
17
- Notes
18
- -----
19
- Note that this DataFrame class is not meant to be instantiated directly by
17
+ Note that this DataFrame object is not meant to be instantiated directly by
20
18
users of the library implementing the dataframe API standard. Rather, use
21
19
constructor functions or an already-created dataframe object retrieved via
22
20
21
+ **Python operator support**
22
+
23
+ All arithmetic operators defined by the Python language, except for
24
+ ``__matmul__``, ``__neg__`` and ``__pos__``, must be supported for
25
+ numerical data types.
26
+
27
+ All comparison operators defined by the Python language must be supported
28
+ by the dataframe object for all data types for which those comparisons are
29
+ supported by the builtin scalar types corresponding to a data type.
30
+
31
+ In-place operators must not be supported. All operations on the dataframe
32
+ object are out-of-place.
33
+
23
34
"""
24
35
@property
25
36
def dataframe (self ) -> object :
Original file line number Diff line number Diff line change @@ -4,57 +4,8 @@ Dataframe object
4
4
================
5
5
6
6
A conforming implementation of the dataframe API standard must provide and
7
- support a dataframe object having the following attributes and methods.
8
-
9
- Operators
10
- ---------
11
-
12
- A conforming implementation of the dataframe API standard must provide and
13
- support a dataframe object supporting the following Python operators.
14
-
15
- Arithmetic Operators
16
- ~~~~~~~~~~~~~~~~~~~~
17
-
18
- A conforming implementation of the array API standard must provide and support
19
- a dataframe object supporting the following Python arithmetic operators.
20
-
21
- Arithmetic operators should be defined for a dataframe having real-valued data types.
22
-
23
- .. note ::
24
-
25
- TODO: figure out whether we want to add ``__neg__ `` and ``__pos__ ``, those
26
- are the two missing arithmetic operators.
27
-
28
-
29
- Comparison Operators
30
- ~~~~~~~~~~~~~~~~~~~~
31
-
32
- A conforming implementation of the dataframe API standard must provide and
33
- support a dataframe object supporting the following Python comparison
34
- operators.
35
-
36
- Comparison operators should be defined for dataframes having any data type.
37
-
38
- In-place Operators
39
- ~~~~~~~~~~~~~~~~~~
40
-
41
- TODO
42
-
43
- Reflected Operators
44
- ~~~~~~~~~~~~~~~~~~~
45
-
46
- TODO
47
-
48
- Arithmetic Operators
49
- """"""""""""""""""""
50
-
51
- - ``__radd__ ``
52
- - ``__rsub__ ``
53
- - ``__rmul__ ``
54
- - ``__rtruediv__ ``
55
- - ``__rfloordiv__ ``
56
- - ``__rpow__ ``
57
- - ``__rmod__ ``
7
+ support a dataframe object having the following methods, attributes, and
8
+ behavior.
58
9
59
10
.. currentmodule :: dataframe_api
60
11
Original file line number Diff line number Diff line change @@ -4,9 +4,10 @@ Groupby object
4
4
==============
5
5
6
6
A conforming implementation of the dataframe API standard must provide and
7
- support a groupby object having the following methods.
7
+ support a groupby object with the following API:
8
8
9
9
.. currentmodule :: dataframe_api
10
10
11
11
.. autoclass :: GroupBy
12
12
13
+
You can’t perform that action at this time.
0 commit comments