has2k1 / plydata

A grammar for data manipulation in Python
https://plydata.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
276 stars 11 forks source link

In example, 'if_else' return error as not defined #10

Closed yongks closed 6 years ago

yongks commented 6 years ago

Firstly, thanks for the great library here. Definitely close the gap for R users like me.

In the example given: df >> define(z=if_else('x > 1', 1, 0)). This returns error as 'if_else' is not defined...

I had tried using ternary function but no luck: df >> define (z = '1 if x>1 else 0')

Did I miss anything ?

has2k1 commented 6 years ago

Check out the documentation, if_else. Make sure to update to the latest version.

blaiseli commented 5 years ago

The example in the documentation is missing an import for if_else.

This issue should probably be considered a documentation issue.

has2k1 commented 5 years ago

@blaiseli, thanks. https://github.com/has2k1/plydata/commit/d8ca85ff70eee621e96f7c74034e90fec16e8b61