rohdesamuel commented on a change in pull request #14308:
URL: https://github.com/apache/beam/pull/14308#discussion_r608892895



##########
File path: sdks/python/apache_beam/examples/dataframe/taxiride.py
##########
@@ -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
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# 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 apache_beam.dataframe.io import read_csv
+from apache_beam.io 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? Is there anything else it can return?




-- 
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]


Reply via email to