[ 
https://issues.apache.org/jira/browse/BEAM-7389?focusedWorklogId=290852&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-290852
 ]

ASF GitHub Bot logged work on BEAM-7389:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Aug/19 23:08
            Start Date: 07/Aug/19 23:08
    Worklog Time Spent: 10m 
      Work Description: rosetn commented on pull request #9265: [BEAM-7389] Add 
code examples for Map page
URL: https://github.com/apache/beam/pull/9265#discussion_r311797092
 
 

 ##########
 File path: website/src/documentation/transforms/python/element-wise/map.md
 ##########
 @@ -19,24 +19,258 @@ limitations under the License.
 -->
 
 # Map
-<table align="left">
-    <a target="_blank" class="button"
+
+<script type="text/javascript">
+localStorage.setItem('language', 'language-py')
+</script>
+
+<table>
+  <td>
+    <a class="button" target="_blank"
         
href="https://beam.apache.org/releases/pydoc/current/apache_beam.transforms.core.html#apache_beam.transforms.core.Map";>
-      <img src="https://beam.apache.org/images/logos/sdks/python.png"; 
width="20px" height="20px"
-           alt="Pydoc" />
-     Pydoc
+      <img src="https://beam.apache.org/images/logos/sdks/python.png";
+          width="20px" height="20px" alt="Pydoc" />
+      Pydoc
     </a>
+  </td>
 </table>
 <br>
+
 Applies a simple 1-to-1 mapping function over each element in the collection.
 
 ## Examples
-See [BEAM-7389](https://issues.apache.org/jira/browse/BEAM-7389) for updates. 
 
-## Related transforms 
+In the following examples, we create a pipeline with a `PCollection` of 
produce their icon, name, and duration.
+Then, we apply `Map` in multiple ways to transform every element in the 
`PCollection`.
+
+`Map` accepts a function that returns a single element for every input element 
in the `PCollection`.
+
+### Example 1: Map with a predefined function
+
+We use the function `str.strip` which takes a single `str` element and outputs 
a `str`.
+It will strip the input element's whitespaces, including newlines and tabs.
 
 Review comment:
   "will strip"->"strips"
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 290852)
    Time Spent: 35.5h  (was: 35h 20m)

> Colab examples for element-wise transforms (Python)
> ---------------------------------------------------
>
>                 Key: BEAM-7389
>                 URL: https://issues.apache.org/jira/browse/BEAM-7389
>             Project: Beam
>          Issue Type: Improvement
>          Components: website
>            Reporter: Rose Nguyen
>            Assignee: David Cavazos
>            Priority: Minor
>          Time Spent: 35.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to