Skip to content

Commit 8d1133e

Browse files
author
Christopher Doris
committed
dont consider Py to be a table
1 parent c3d4750 commit 8d1133e

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

docs/src/releasenotes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
column types; better handling of non-string column names; columns are usually wrappers
99
(`PyArray` or `PyList`). Constructor arguments have changed. Dict methods have been
1010
removed (basically only the Tables interface is supported).
11+
* **Breaking.** A `Py` which is convertible to `PyTable` is no longer considered to be a
12+
table itself; you must convert explicitly.
1113
* Adds `pyhasitem` and 3-arg `pygetitem`.
1214
* Extends `Base.get`, `Base.get!`, `Base.haskey` and 2-arg `Base.hash` for `Py`.
1315
* `PyArray` can now have any element type when the underlying array is of Python objects.

src/pywrap/PyTable.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
"""
2-
PyTable
2+
PyTable(x)
33
4-
Abstract type for Python wrappers which may be interpretable as Tables.jl-compatible tables.
4+
Wrap `x` as a Tables.jl-compatible table.
55
6-
If `pyconvert(PyTable, x::Py)` is a table, then `x` is also a table.
6+
`PyTable` is an abstract type. See [`PyPandasDataFrame`](@ref) for a concrete example.
77
"""
88
abstract type PyTable end
99
export PyTable
1010

1111
PyTable(x) = pyconvert(PyTable, x)
1212

13-
Tables.istable(x::Py) = Tables.istable(@pyconvert(PyTable, x, return false))
14-
Tables.rowaccess(x::Py) = Tables.rowaccess(@pyconvert(PyTable, x, return false))
15-
Tables.rows(x::Py) = Tables.rows(pyconvert(PyTable, x))
16-
Tables.columnaccess(x::Py) = Tables.columnaccess(@pyconvert(PyTable, x, return false))
17-
Tables.columns(x::Py) = Tables.columns(pyconvert(PyTable, x))
18-
Tables.materializer(x::Py) = Tables.materializer(pyconvert(PyTable, x))
13+
# Tables.istable(x::Py) = Tables.istable(@pyconvert(PyTable, x, return false))
14+
# Tables.rowaccess(x::Py) = Tables.rowaccess(@pyconvert(PyTable, x, return false))
15+
# Tables.rows(x::Py) = Tables.rows(pyconvert(PyTable, x))
16+
# Tables.columnaccess(x::Py) = Tables.columnaccess(@pyconvert(PyTable, x, return false))
17+
# Tables.columns(x::Py) = Tables.columns(pyconvert(PyTable, x))
18+
# Tables.materializer(x::Py) = Tables.materializer(pyconvert(PyTable, x))

0 commit comments

Comments
 (0)