Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e362b88

Browse files
committedNov 1, 2023
add note about free-standing columns
1 parent c83cfca commit e362b88

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
 

‎spec/API_specification/dataframe_api/column_object.py

+13
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@ class Column(Protocol):
1919
users of the library implementing the dataframe API standard. Rather, use
2020
constructor functions or an already-created dataframe object retrieved via
2121
:meth:`DataFrame.col`.
22+
23+
The parent dataframe (which can be retrieved via the :meth:`dataframe` property)
24+
plays a key role here:
25+
26+
- If two columns were retrieved from the same dataframe,
27+
then they can be combined and compared at will.
28+
- If two columns were retrieved from different dataframes,
29+
then there is no guarantee about how or whether they can be combined and
30+
compared, this may vary across implementations.
31+
- If two columns are both "free-standing" (i.e. not retrieved from a dataframe
32+
but constructed directly from a 1D array or sequence), then they can be
33+
combined and compared with each other. Note, however, that they still can't
34+
be compared or combined with columns retrieved from a dataframe.
2235
"""
2336
@property
2437
def dataframe(self) -> DataFrame | None:

0 commit comments

Comments
 (0)
Please sign in to comment.