1. Takafumi Arakaki
  2. restructured-spreadsheet

Commits

Takafumi Arakaki  committed 4b175b1

added example on "Conditions".

  • Participants
  • Parent commits 1230416
  • Branches default

Comments (0)

Files changed (1)

File doc/sample.rst

View file
  • Ignore whitespace
        :eq: {1:i==0} = 3
             {1:0<i<last} = col.int[-1] + 1
             {1:i==last} = sum(col.int)
+            {2:i==last} = col.sum()
+            {3:i==last} = col.mean()
 
-       ======== ===============
-       #        increment/sum
-       ======== ===============
-       0
-       1
-       2
+       ======== =============== ========== ===========
+       #        increment/sum   sum data   mean data
+       ======== =============== ========== ===========
+       0                        2.1        4.1
+       1                        3.2        3.2
+       2                        4.3        2.3
        sum
-       ======== ===============
+       ======== =============== ========== ===========
 
 .. spreadsheet:: Use of condition
    :eq: {1:i==0} = 3
         {1:0<i<last} = col.int[-1] + 1
         {1:i==last} = sum(col.int)
+        {2:i==last} = col.sum()
+        {3:i==last} = col.mean()
 
-   ======== ===============
-   #        increment/sum
-   ======== ===============
-   0
-   1
-   2
+   ======== =============== ========== ===========
+   #        increment/sum   sum data   mean data
+   ======== =============== ========== ===========
+   0                        2.1        4.1
+   1                        3.2        3.2
+   2                        4.3        2.3
    sum
-   ======== ===============
+   ======== =============== ========== ===========
 
 
 Error handling