@@ -110,12 +110,12 @@ end
110
110
pyattr (class, method) = pyattr (class, method, method)
111
111
112
112
function pyattr (class, jl_method, py_method)
113
- # m_quote = quot(py_method)
114
113
m_quote = string (py_method)
115
114
quote
116
115
function $ (esc (jl_method))(pyt:: $class , args... ; kwargs... )
117
116
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... )
119
119
wrapped = pandas_wrap (pyo)
120
120
end
121
121
end
197
197
@pytype GroupBy ()-> pandas_raw[:core ][:groupby ][" DataFrameGroupBy" ]
198
198
@pytype SeriesGroupBy ()-> pandas_raw[:core ][:groupby ][" SeriesGroupBy" ]
199
199
200
-
201
- @pyattr DataFrame groupby
202
- @pyattr DataFrame columns
203
200
@pyattr GroupBy app apply
204
201
205
-
206
202
pyattr_set ([GroupBy, SeriesGroupBy], :mean , :std , :agg , :aggregate , :median ,
207
203
:var , :ohlc , :transform , :groups , :indices , :get_group , :hist , :plot , :count )
208
204
@@ -221,6 +217,7 @@ pyattr_set([DataFrame, Series], :T, :abs, :align, :any, :argsort, :asfreq, :asof
221
217
:to_json , :to_latex , :to_msgpack , :to_panel , :to_pickle , :to_records , :to_sparse ,
222
218
:to_sql , :to_string , :truncate , :tz_conert , :tz_localize , :unstack , :var , :weekday ,
223
219
:xs , :index , :merge )
220
+ pyattr_set ([DataFrame], :groupby , :columns )
224
221
225
222
Base. size (x:: Union{Loc, Iloc, Ix} ) = x. pyo[:obj ][:shape ]
226
223
Base. size (df:: PandasWrapped , i:: Integer ) = size (df)[i]
248
245
249
246
Base. ndims (df:: Union{DataFrame, Series} ) = length (size (df))
250
247
251
-
252
248
for m in [:read_pickle , :read_csv , :read_html , :read_json , :read_excel , :read_table ,
253
249
:save , :stats , :melt , :ewma , :concat , :pivot_table , :crosstab , :cut ,
254
250
:qcut , :get_dummies , :resample , :date_range , :to_datetime , :to_timedelta ,
0 commit comments