Skip to content

Commit 462719e

Browse files
committed
Don't auto-convert
1 parent bf681a1 commit 462719e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/Pandas.jl

+4-5
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ const type_map = Dict{PyObject, Type}()
3434

3535
abstract type PandasWrapped end
3636

37-
convert(::Type{PyObject}, x::PandasWrapped) = x.pyo
38-
3937
macro pytype(name, class)
4038
quote
4139
immutable $(name) <: PandasWrapped
@@ -112,11 +110,12 @@ end
112110
pyattr(class, method) = pyattr(class, method, method)
113111

114112
function pyattr(class, jl_method, py_method)
115-
m_quote = quot(py_method)
113+
# m_quote = quot(py_method)
114+
m_quote = string(py_method)
116115
quote
117116
function $(esc(jl_method))(pyt::$class, args...; kwargs...)
118117
new_args = fix_arg.(args)
119-
pyo = pyt.pyo[$m_quote](new_args...; kwargs...)
118+
pyo = pyt.pyo[$(string(py_method))](new_args...; kwargs...)
120119
wrapped = pandas_wrap(pyo)
121120
end
122121
end
@@ -263,7 +262,7 @@ for m in [:read_pickle, :read_csv, :read_html, :read_json, :read_excel, :read_ta
263262
:expanding_quantile, :rolling_window, :to_numeric]
264263
@eval begin
265264
function $m(args...; kwargs...)
266-
pandas_raw[m](args...; kwargs...)
265+
pandas_wrap(pandas_raw[$(string(m))](args...; kwargs...))
267266
end
268267
end
269268
end

test/test.csv

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
x,y
2+
5,jon
3+
10,bob

0 commit comments

Comments
 (0)