Skip to content

Commit 0177f2a

Browse files
committed
Fix columns
1 parent d6377e8 commit 0177f2a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Pandas.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ pyattr_set([DataFrame, Series], :T, :abs, :align, :any, :argsort, :asfreq, :asof
217217
:to_json, :to_latex, :to_msgpack, :to_panel, :to_pickle, :to_records, :to_sparse,
218218
:to_sql, :to_string, :truncate, :tz_conert, :tz_localize, :unstack, :var, :weekday,
219219
:xs, :merge)
220-
pyattr_set([DataFrame], :groupby, :columns)
220+
pyattr_set([DataFrame], :groupby)
221221

222222
Base.size(x::Union{Loc, Iloc, Ix}) = x.pyo[:obj][:shape]
223223
Base.size(df::PandasWrapped, i::Integer) = size(df)[i]
@@ -235,8 +235,10 @@ function should_offset(s::Series, arg)
235235
false
236236
end
237237

238-
function index(x::PandasWrapped)
239-
pandas_wrap(x.pyo["index"])
238+
for attr in [:index, :columns]
239+
@eval function $attr(x::PandasWrapped)
240+
pandas_wrap(x.pyo[$(string(attr))])
241+
end
240242
end
241243

242244
@pyasvec Series

0 commit comments

Comments
 (0)