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

过滤数据,string类型怎么处理呢? #11

Closed
skyue opened this issue Nov 23, 2016 · 7 comments
Closed

过滤数据,string类型怎么处理呢? #11

skyue opened this issue Nov 23, 2016 · 7 comments

Comments

@skyue
Copy link

skyue commented Nov 23, 2016

wiki上的例子都是数字过滤,涉及string如何处理。
我把日期也直接存为了string,比如「20161123」,如何选择这一天的记录?

update:
改用filter方法,提示「keyword can't be an expression」

org.filter(org.product='vt_finance', org.day='20161122', hour='23').head(5)

@skyue skyue changed the title 过滤数据,涉及string数据怎么处理呢? 过滤数据,string类型怎么处理呢? Nov 23, 2016
@skyue
Copy link
Author

skyue commented Nov 23, 2016

自己折腾出来了,原来就是按pandas处理,初学者,不熟。。

@skyue skyue closed this as completed Nov 23, 2016
@Cheonsoon
Copy link

@skyue hi,咨询一下,string类型like过滤如何处理呢?我按照 http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.filter.html?highlight=filter#pandas.DataFrame.filter 好像也没有试出来额

@Cheonsoon
Copy link

@skyue 哈哈,搞定,初玩pandas,完全不会,http://stackoverflow.com/questions/31254738/how-to-filter-pandas-dataframe-by-string 这样解决了。。

@qinxuye
Copy link
Contributor

qinxuye commented Jan 13, 2017

df.field.contains('sth')

@Cheonsoon
Copy link

对对对对对,谢谢谢谢啦~~

@qinxuye
Copy link
Contributor

qinxuye commented Jan 13, 2017

pandas的问题不要到我们的issue下面来问问题哈。

@Cheonsoon
Copy link

好拔拔😊😊

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

3 participants