aliyun / aliyun-odps-python-sdk

ODPS Python SDK and data analysis framework
http://pyodps.readthedocs.io
Apache License 2.0
434 stars 97 forks source link

How to convert pyodps dataFrame count() to int64 #125

Closed mobilestack closed 4 years ago

mobilestack commented 4 years ago

Since it is a type of odps.df.expr.core.Count, I tried other ways, they just do not work. One works for me, as int(repr(df.count())), but seems there must be something better, is there?

hekaisheng commented 4 years ago

refer to the docs: https://pyodps.readthedocs.io/zh_CN/latest/df-basic.html#id12 .

use df.count().execute().

mobilestack commented 4 years ago

refer to the docs: https://pyodps.readthedocs.io/zh_CN/latest/df-basic.html#id12 .

use df.count().execute().

It works, thanks!