You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using PythonCall
using Tables
@pyg`import numpy as npimport pandas as pd$x = pd.DataFrame(np.array((100, 100)))`# Make sure the columns are strings, or it will fail in any case.@pyg`$x.columns = map(str, $x.columns)`
y =PyPandasDataFrame(x)
Tables.columns(y)
I get the error:
ERROR: LoadError: map is not defined on sets
Stacktrace:
[1] error(s::String)
@ Base .\error.jl:33
[2] map(f::Type, #unused#::Base.KeySet{String, PyPandasDataFrame})
@ Base .\abstractarray.jl:2326
[3] columns(x::PyPandasDataFrame)
@ PythonCall [,,,]\.julia\packages\PythonCall\MBkDb\src\PyPandasDataFrame.jl:155
This could be fixed by changing the map call on line 155 to map(Symbol, collect(keys(x))) instead.
The text was updated successfully, but these errors were encountered:
When running the following example code:
I get the error:
This could be fixed by changing the map call on line 155 to
map(Symbol, collect(keys(x)))
instead.The text was updated successfully, but these errors were encountered: