Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request]pick 字段过滤增加反向过滤功能 #51

Open
HaveF opened this issue Feb 13, 2019 · 0 comments
Open

[feature request]pick 字段过滤增加反向过滤功能 #51

HaveF opened this issue Feb 13, 2019 · 0 comments

Comments

@HaveF
Copy link

HaveF commented Feb 13, 2019

*Link:

Transform 数据转换 · pick 字段过滤

dv.transform({
  type: 'pick',
  fields: [ 'xxx', 'yyy' ] // 决定保留哪些字段,如果不传,则返回所有字段
});

能不能再加个反向的逻辑, 即, 决定不保留哪些字段? 看了下源码, 没太看懂怎么加....

如果如下简单凑合也是能用的, 但这种, 不能 dv.transform...transform...transform...而且可能还有其他问题

fields: Object.keys(dv.rows[0]).filter(f=> !['zzz', 'aaa'].includes(f))
  • Platform:
  • Mini Showcase(like screenshots):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant