beam-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (BEAM-12024) Add well-documented DataFrame example pipelines
Date Wed, 07 Apr 2021 18:28:00 GMT


ASF GitHub Bot logged work on BEAM-12024:

                Author: ASF GitHub Bot
            Created on: 07/Apr/21 18:27
            Start Date: 07/Apr/21 18:27
    Worklog Time Spent: 10m 
      Work Description: rohdesamuel commented on a change in pull request #14308:

File path: sdks/python/apache_beam/examples/dataframe/
@@ -0,0 +1,115 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Pipelines that use the DataFrame API to process NYC taxiride CSV data."""
+# pytype: skip-file
+from __future__ import absolute_import
+import argparse
+import logging
+import apache_beam as beam
+from apache_beam.dataframe.convert import to_dataframe
+from apache_beam.dataframe.convert import to_pcollection
+from import read_csv
+from import ReadFromText
+from apache_beam.options.pipeline_options import PipelineOptions
+ZONE_LOOKUP_PATH = "gs://apache-beam-samples/nyc_taxi/misc/taxi+_zone_lookup.csv"
+def run_aggregation_pipeline(pipeline_args, input_path, output_path):
+  # The pipeline will be run on exiting the with block.
+  with beam.Pipeline(options=PipelineOptions(pipeline_args)) as p:
+    rides = p | read_csv(input_path)

Review comment:
       For my own edification, does read_csv expand and return a beam DataFrame?

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:

Issue Time Tracking

    Worklog Id:     (was: 578531)
    Time Spent: 2h 10m  (was: 2h)

> Add well-documented DataFrame example pipelines
> -----------------------------------------------
>                 Key: BEAM-12024
>                 URL:
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py-core
>            Reporter: Brian Hulette
>            Assignee: Brian Hulette
>            Priority: P2
>              Labels: dataframe-api
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h

This message was sent by Atlassian Jira

View raw message