Skip to content

Commit 1a7b813

Browse files
committed
upgrade to 0.7.20.1
1 parent 174b570 commit 1a7b813

File tree

12 files changed

+265
-183
lines changed

12 files changed

+265
-183
lines changed

docs/source/df-sort-distinct-apply.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ apply 的自定义函数接收一个参数,为上一步 Collection 的一行
456456
使用 apply 对行操作,且 ``reduce``\ 为 False 时,可以使用 :ref:`dflateralview` 与已有的行结合,用于后续聚合等操作。
457457

458458
.. code:: python
459-
459+
460460
>>> from odps.df import output
461461
>>>
462462
>>> @output(['iris_add', 'iris_sub'], ['float', 'float'])
@@ -576,6 +576,7 @@ PyODPS DataFrame也支持MapReduce API,用户可以分别编写map和reduce函
576576
>>> yield word.lower(), 1
577577
>>>
578578
>>> def reducer(keys):
579+
>>> # 这里使用 list 而不是 cnt = 0,否则 h 内的 cnt 会被认为是局部变量,其中的赋值无法输出
579580
>>> cnt = [0]
580581
>>> def h(row, done): # done表示这个key已经迭代结束
581582
>>> cnt[0] += row[1]
@@ -629,6 +630,7 @@ group参数用来指定reduce按哪些字段做分组,如果不指定,会按
629630
>>>
630631
>>> @output(['word', 'cnt'], ['string', 'int'])
631632
>>> def reducer(keys):
633+
>>> # 这里使用 list 而不是 cnt = 0,否则 h 内的 cnt 会被认为是局部变量,其中的赋值无法输出
632634
>>> cnt = [0]
633635
>>> def h(row, done): # done表示这个key已经迭代结束
634636
>>> cnt[0] += row.cnt

docs/source/locale/en/LC_MESSAGES/api-df.po

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PyODPS 0.7.16\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2018-07-10 10:42+0800\n"
11+
"POT-Creation-Date: 2018-11-08 12:41+0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
1515
"MIME-Version: 1.0\n"
1616
"Content-Type: text/plain; charset=utf-8\n"
1717
"Content-Transfer-Encoding: 8bit\n"
18-
"Generated-By: Babel 2.5.3\n"
18+
"Generated-By: Babel 2.6.0\n"
1919

2020
#: ../../source/api-df.rst:4
2121
msgid "DataFrame Reference"
@@ -679,7 +679,15 @@ msgid "collection"
679679
msgstr ""
680680

681681
#: odps.df.CollectionExpr.columns:1 of
682-
msgid "*return* -- columns :rtype: list which each element is a Column"
682+
msgid "columns :rtype: list which each element is a Column"
683+
msgstr ""
684+
685+
#: odps.df.CollectionExpr.columns odps.df.SequenceExpr.dtype of
686+
msgid "type"
687+
msgstr ""
688+
689+
#: odps.df.CollectionExpr.columns:4 of
690+
msgid "return"
683691
msgstr ""
684692

685693
#: odps.df.CollectionExpr.compile:1 odps.df.RandomScalar.compile:1
@@ -1902,14 +1910,18 @@ msgstr ""
19021910

19031911
#: odps.df.SequenceExpr.dtype:1 of
19041912
msgid ""
1905-
"*Return the data type. Available types* -- int8, int16, int32, int64, "
1906-
"float32, float64, boolean, string, decimal, datetime"
1913+
"int8, int16, int32, int64, float32, float64, boolean, string, decimal, "
1914+
"datetime"
19071915
msgstr ""
19081916

19091917
#: odps.df.SequenceExpr.dtype:3 of
19101918
msgid "the data type"
19111919
msgstr ""
19121920

1921+
#: odps.df.SequenceExpr.dtype:5 of
1922+
msgid "Return the data type. Available types"
1923+
msgstr ""
1924+
19131925
#: odps.df.RandomScalar.fillna:1 odps.df.Scalar.fillna:1
19141926
#: odps.df.SequenceExpr.fillna:1 of
19151927
msgid "Fill null with value."

0 commit comments

Comments
 (0)