[Pandas-dev] Pandas lite

Tom Augspurger tom.augspurger88 at gmail.com
Sun Nov 19 08:04:32 EST 2017


I'm not aware of any attempts to do that. Personally, I would recommend the
first option as it's the least amount of work,
and the least likely to force them to unlearn anything.

I suppose another option would be to have them import a module that just
monkey patches what shows up in dir(Series/DataFrame)
so that tab-completion is less overwhelming.

Good luck.

- Tom

On Sat, Nov 18, 2017 at 2:21 AM, Aivar Annamaa <aivar.annamaa at gmail.com>
wrote:

> Hi!
>
> I'm going to teach an introduction to pandas to Python newbies, and I'm
> looking for ways to simplify the the view to the API and/or avoid some of
> the pitfalls.
>
> I'd like to identify a minimal set of methods/operations, which are enough
> for performing most common tasks with simply-indexed data
> (importing/exporting from csv/Excel, selecting rows and columns by index,
> boolean indexing of the rows, creating new columns, simple group-by and
> aggregations, simple plotting, maybe also simple joins) and which have
> minimal potential for surprises (unexpected copies, unexpected views,
> confusing warnings, differences with indexing with lists vs tuples etc).
> Maybe even allowing only "pure" transformations a la relational algebra? We
> could call it an opinionated and restricted usage-scheme of pandas.
>
> The students would use this subset of the API until they gain enough
> experience to meet the hairier face of pandas.
>
> Has anybody tried marking a subset of pandas API for some reasons?
>
> I was also thinking about how to enforce the boundaries of this subset:
>
>    - Just suggest students to stick with it.
>    - Provide a static analysis which disallows (or warns against) the
>    operations/tricks outside the boundaries.
>    - a wrapper library (eg. import pandaslite as pd) which wraps required
>    pandas classes into similar classes which publish only a subset of the
>    pandas capabilities and perform some extra checks (eg. disallow duplicates
>    in the index). When the students grow tough enough or need more power, they
>    would simply replace "import pandaslite as pd" with "import pandas as pd"
>    in their code.
>
> At the moment I'm considering experimenting with the third approach.
>
> I'd be glad to hear your comments!
>
> best regards,
> Aivar Annamaa
>
> _______________________________________________
> 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/20171119/015ec2ad/attachment.html>


More information about the Pandas-dev mailing list