Skip to content

Commit 556376a

Browse files
committed
Merge remote-tracking branch 'upstream/main' into namespace-date
2 parents 686a89a + 3b6ae24 commit 556376a

File tree

9 files changed

+240
-174
lines changed

9 files changed

+240
-174
lines changed

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ jobs:
2727
~\AppData\Local\pip\Cache
2828
key: ${{ runner.os }}-build-${{ matrix.python-version }}
2929
- name: install-reqs
30-
run: python -m pip install --upgrade mypy==1.4.0
30+
run: python -m pip install --upgrade mypy==1.4.0 typing-extensions
3131
- name: run mypy
3232
run: cd spec/API_specification && mypy dataframe_api && mypy examples

spec/API_specification/dataframe_api/__init__.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"column_from_sequence",
3737
"concat",
3838
"dataframe_from_2d_array",
39-
"dataframe_from_dict",
39+
"dataframe_from_columns",
4040
"date",
4141
"is_dtype",
4242
"is_null",
@@ -92,27 +92,20 @@ def column_from_sequence(sequence: Sequence[Any], *, dtype: DType, name: str = '
9292
"""
9393
...
9494

95-
def dataframe_from_dict(data: Mapping[str, Column]) -> DataFrame:
95+
def dataframe_from_columns(*columns: Column) -> DataFrame:
9696
"""
97-
Construct DataFrame from map of column names to Columns.
97+
Construct DataFrame from sequence of Columns.
9898
9999
Parameters
100100
----------
101-
data : Mapping[str, Column]
102-
Column must be of the corresponding type of the DataFrame.
101+
columns : Column
102+
Column(s) must be of the corresponding type of the DataFrame.
103103
For example, it is only supported to build a ``LibraryXDataFrame`` using
104104
``LibraryXColumn`` instances.
105105
106106
Returns
107107
-------
108108
DataFrame
109-
110-
Raises
111-
------
112-
ValueError
113-
If any of the columns already has a name, and the corresponding key
114-
in `data` doesn't match.
115-
116109
"""
117110
...
118111

0 commit comments

Comments
 (0)