[Pandas-dev] Help replacing workflows that used DataFrame.select

Joris Van den Bossche jorisvandenbossche at gmail.com
Tue Dec 5 11:46:20 EST 2017


I think that could be a possibility, to force people to explicitly specify
the axis in select(), but it would still be only in the long term that
people can then actually drop this specification if they want to select the
columns. But maybe that's not too bad?

Other possibility is another name, and then something like select_columns()
(or select_labels() if we don't want to have it specifically for columns)
is maybe an option?


2017-11-29 1:29 GMT+01:00 Jon Mease <jon.mease at gmail.com>:

> Perhaps for versions 0.21.1 and 0.22 a warning could be issued when
> .select() is used without an explicit `axis` parameter.
>
> The warning would state that the current default is `axis=0` but that this
> will change to `axis=1` in the next major release. If the user wants the
> current default behavior then they could suppress the warning and
> future-proof their code by passing `axis=0` explicitly.
>
> -Jon
>
> On Tue, Nov 28, 2017 at 6:28 PM, Joris Van den Bossche <
> jorisvandenbossche at gmail.com> wrote:
>
>> Would there be a way in keeping .select() but only deprecating the
>> (default) `axis=0` ? Or would that only be more confusing?
>>
>> Because if we would find a name for such a method that defaults to the
>> columns, we would come up with 'select' ...
>>
>> 2017-11-28 19:58 GMT+01:00 Stephan Hoyer <shoyer at gmail.com>:
>>
>>> On Tue, Nov 28, 2017 at 6:34 PM Paul Hobson <pmhobson at gmail.com> wrote:
>>>
>>>> Thanks for the info. While .select on the default axis (index) is
>>>> indeed very different than SQL, operating on the columns is very similar
>>>> (jn my twisted brain at least).
>>>>
>>>
>>> Agreed, but sadly .select() didn't default to axis=1.
>>>
>>
>>
>> _______________________________________________
>> Pandas-dev mailing list
>> Pandas-dev at python.org
>> https://mail.python.org/mailman/listinfo/pandas-dev
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pandas-dev/attachments/20171205/e0d200e0/attachment.html>


More information about the Pandas-dev mailing list