@@ -4,169 +4,9 @@ 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
- -------------------------------------------------
10
-
11
- .. _operators :
12
-
13
- Operators
14
- ---------
15
-
16
- A conforming implementation of the dataframe API standard must provide and
17
- support a dataframe object supporting the following Python operators.
18
-
19
- Arithmetic Operators
20
- ~~~~~~~~~~~~~~~~~~~~
21
-
22
- A conforming implementation of the array API standard must provide and support
23
- an array object supporting the following Python arithmetic operators.
24
-
25
- - `x1 + x2 `: :meth: `.DataFrame.__add__ `
26
-
27
- - `operator.add(x1, x2) <https://docs.python.org/3/library/operator.html#operator.add >`_
28
- - `operator.__add__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__add_ _>`_
29
-
30
- - `x1 - x2 `: :meth: `.DataFrame.__sub__ `
31
-
32
- - `operator.sub(x1, x2) <https://docs.python.org/3/library/operator.html#operator.sub >`_
33
- - `operator.__sub__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__sub_ _>`_
34
-
35
- - `x1 * x2 `: :meth: `.DataFrame.__mul__ `
36
-
37
- - `operator.mul(x1, x2) <https://docs.python.org/3/library/operator.html#operator.mul >`_
38
- - `operator.__mul__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__mul_ _>`_
39
-
40
- - `x1 / x2 `: :meth: `.DataFrame.__truediv__ `
41
-
42
- - `operator.truediv(x1,x2) <https://docs.python.org/3/library/operator.html#operator.truediv >`_
43
- - `operator.__truediv__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__truediv_ _>`_
44
-
45
- - `x1 // x2 `: :meth: `.DataFrame.__floordiv__ `
46
-
47
- - `operator.floordiv(x1, x2) <https://docs.python.org/3/library/operator.html#operator.floordiv >`_
48
- - `operator.__floordiv__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__floordiv_ _>`_
49
-
50
- - `x1 % x2 `: :meth: `.DataFrame.__mod__ `
51
-
52
- - `operator.mod(x1, x2) <https://docs.python.org/3/library/operator.html#operator.mod >`_
53
- - `operator.__mod__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__mod_ _>`_
54
-
55
- - `x1 ** x2 `: :meth: `.DataFrame.__pow__ `
56
-
57
- - `operator.pow(x1, x2) <https://docs.python.org/3/library/operator.html#operator.pow >`_
58
- - `operator.__pow__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__pow_ _>`_
59
-
60
- Arithmetic operators should be defined for a dataframe having real-valued data types.
61
-
62
- .. note ::
63
-
64
- TODO: figure out whether we want to add ``__neg__ `` and ``__pos__ ``, those
65
- are the two missing arithmetic operators.
66
-
67
-
68
- Comparison Operators
69
- ~~~~~~~~~~~~~~~~~~~~
70
-
71
- A conforming implementation of the dataframe API standard must provide and
72
- support a dataframe object supporting the following Python comparison
73
- operators.
74
-
75
- - `x1 < x2 `: :meth: `.DataFrame.__lt__ `
76
-
77
- - `operator.lt(x1, x2) <https://docs.python.org/3/library/operator.html#operator.lt >`_
78
- - `operator.__lt__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__lt_ _>`_
79
-
80
- - `x1 <= x2 `: :meth: `.DataFrame.__le__ `
81
-
82
- - `operator.le(x1, x2) <https://docs.python.org/3/library/operator.html#operator.le >`_
83
- - `operator.__le__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__le_ _>`_
84
-
85
- - `x1 > x2 `: :meth: `.DataFrame.__gt__ `
86
-
87
- - `operator.gt(x1, x2) <https://docs.python.org/3/library/operator.html#operator.gt >`_
88
- - `operator.__gt__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__gt_ _>`_
89
-
90
- - `x1 >= x2 `: :meth: `.DataFrame.__ge__ `
91
-
92
- - `operator.ge(x1, x2) <https://docs.python.org/3/library/operator.html#operator.ge >`_
93
- - `operator.__ge__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__ge_ _>`_
94
-
95
- - `x1 == x2 `: :meth: `.DataFrame.__eq__ `
96
-
97
- - `operator.eq(x1, x2) <https://docs.python.org/3/library/operator.html#operator.eq >`_
98
- - `operator.__eq__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__eq_ _>`_
99
-
100
- - `x1 != x2 `: :meth: `.DataFrame.__ne__ `
101
-
102
- - `operator.ne(x1, x2) <https://docs.python.org/3/library/operator.html#operator.ne >`_
103
- - `operator.__ne__(x1, x2) <https://docs.python.org/3/library/operator.html#operator.__ne_ _>`_
104
-
105
- Comparison operators should be defined for dataframes having any data type.
106
-
107
- In-place Operators
108
- ~~~~~~~~~~~~~~~~~~
109
-
110
- TODO
111
-
112
- Reflected Operators
113
- ~~~~~~~~~~~~~~~~~~~
114
-
115
- TODO
116
-
117
- Arithmetic Operators
118
- """"""""""""""""""""
119
-
120
- - ``__radd__ ``
121
- - ``__rsub__ ``
122
- - ``__rmul__ ``
123
- - ``__rtruediv__ ``
124
- - ``__rfloordiv__ ``
125
- - ``__rpow__ ``
126
- - ``__rmod__ ``
127
-
128
- -------------------------------------------------
7
+ support a dataframe object having the following methods, attributes, and
8
+ behavior.
129
9
130
10
.. currentmodule :: dataframe_api
131
11
132
- Attributes
133
- ----------
134
-
135
- TODO
136
-
137
- ..
138
- NOTE: please keep the attributes in alphabetical order
139
-
140
-
141
- ..
142
- autosummary::
143
- :toctree: generated
144
- :template: property.rst
145
-
146
- DataFrame.shape
147
-
148
- -------------------------------------------------
149
-
150
- Methods
151
- -------
152
- ..
153
- NOTE: please keep the methods in alphabetical order
154
-
155
-
156
- .. autosummary ::
157
- :toctree: generated
158
- :template: property.rst
159
-
160
- DataFrame.__add__
161
- DataFrame.__eq__
162
- DataFrame.__floordiv__
163
- DataFrame.__ge__
164
- DataFrame.__gt__
165
- DataFrame.__le__
166
- DataFrame.__lt__
167
- DataFrame.__ne__
168
- DataFrame.__mod__
169
- DataFrame.__mul__
170
- DataFrame.__pow__
171
- DataFrame.__sub__
172
- DataFrame.__truediv__
12
+ .. autoclass :: DataFrame
0 commit comments