Skip to content

Commit 596c0f3

Browse files
committed
No automatic conversions
1 parent 9d94967 commit 596c0f3

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

src/Pandas.jl

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ end
110110
pyattr(class, method) = pyattr(class, method, method)
111111

112112
function pyattr(class, jl_method, py_method)
113-
# m_quote = quot(py_method)
114113
m_quote = string(py_method)
115114
quote
116115
function $(esc(jl_method))(pyt::$class, args...; kwargs...)
117116
new_args = fix_arg.(args)
118-
pyo = pyt.pyo[$(string(py_method))](new_args...; kwargs...)
117+
method = pyt.pyo[$(string(py_method))]
118+
pyo = pycall(method, PyObject, new_args...; kwargs...)
119119
wrapped = pandas_wrap(pyo)
120120
end
121121
end
@@ -197,12 +197,8 @@ end
197197
@pytype GroupBy ()->pandas_raw[:core][:groupby]["DataFrameGroupBy"]
198198
@pytype SeriesGroupBy ()->pandas_raw[:core][:groupby]["SeriesGroupBy"]
199199

200-
201-
@pyattr DataFrame groupby
202-
@pyattr DataFrame columns
203200
@pyattr GroupBy app apply
204201

205-
206202
pyattr_set([GroupBy, SeriesGroupBy], :mean, :std, :agg, :aggregate, :median,
207203
:var, :ohlc, :transform, :groups, :indices, :get_group, :hist, :plot, :count)
208204

@@ -221,6 +217,7 @@ pyattr_set([DataFrame, Series], :T, :abs, :align, :any, :argsort, :asfreq, :asof
221217
:to_json, :to_latex, :to_msgpack, :to_panel, :to_pickle, :to_records, :to_sparse,
222218
:to_sql, :to_string, :truncate, :tz_conert, :tz_localize, :unstack, :var, :weekday,
223219
:xs, :index, :merge)
220+
pyattr_set([DataFrame], :groupby, :columns)
224221

225222
Base.size(x::Union{Loc, Iloc, Ix}) = x.pyo[:obj][:shape]
226223
Base.size(df::PandasWrapped, i::Integer) = size(df)[i]
@@ -248,7 +245,6 @@ end
248245

249246
Base.ndims(df::Union{DataFrame, Series}) = length(size(df))
250247

251-
252248
for m in [:read_pickle, :read_csv, :read_html, :read_json, :read_excel, :read_table,
253249
:save, :stats, :melt, :ewma, :concat, :pivot_table, :crosstab, :cut,
254250
:qcut, :get_dummies, :resample, :date_range, :to_datetime, :to_timedelta,

0 commit comments

Comments
 (0)