Select multiple columns from pandas dataframe

basically it’s because various overload in python such that you need to go a bit low-level.

iloc under the hood isn’t a simple function call because it’s the iloc tied to a PyObject so you can’t get the df.iloc first (at that point the pandas magic won’t work). So you need to manually use get( to tell PyCall those two arguments need to go inside df.iloc in python, not in julia.

see also: https://github.com/JuliaPy/PyCall.jl#pyobject

2 Likes