Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 1.69 KB

File metadata and controls

85 lines (54 loc) · 1.69 KB
title description keywords author ms.author manager ms.date ms.topic ms.service ms.assetid ROBOTS audience ms.devlang ms.reviewer ms.suite ms.tgt_pltfrm ms.custom
RxDataSource: Base class generator for data source objects (revoscalepy)
Base class for all revoscalepy data sources. Can be used with head() and tail() to display the first and last rows of the data set.
head, tail
chuckheinzelman
charlhe
cgronlun
07/15/2019
reference
mlserver
Python

RxDataSource

revoscalepy.RxDataSource(column_info: dict = None)

Description

Base class for all revoscalepy data sources. Can be used with head() and tail() to display the first and last rows of the data set.

Arguments

num_rows

Integer value specifying the number of rows to display starting from the beginning of the dataset. If not specified, the default of 6 will be used.

report_progress

Integer value with options:

  • 0: no progress is reported.
  • 1: the number of processed rows is printed and updated.
  • 2: rows processed and timings are reported.
  • 3: rows processed and all timings are reported.

Example

# Return the first 4 rows
import os
from revoscalepy import RxOptions, RxXdfData
sample_data_path = RxOptions.get_option("sampleDataDir")
ds = RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
ds.head(num_rows=4)

# Return the last 4 rows
import os
from revoscalepy import RxOptions, RxXdfData
sample_data_path = RxOptions.get_option("sampleDataDir")
ds = RxXdfData(os.path.join(sample_data_path, "AirlineDemoSmall.xdf"))
ds.tail(num_rows=4)