API Guide for Users from Other Data Libraries
Contents
API Guide for Users from Other Data Libraries#
Ray Datasets is a data loading and preprocessing library for ML. It shares certain similarities with other ETL data processing libraries, but also has its own focus. In this API guide, we will provide API mappings for users who come from those data libraries, so you can quickly map what you may already know to Ray Datasets APIs.
Note
This is meant to map APIs that perform comparable but not necessarily identical operations. Please check the API reference for exact semantics and usage.
This list may not be exhaustive: Ray Datasets is not a traditional ETL data processing library, so not all data processing APIs can map to Datasets. In addition, we try to focus on common APIs or APIs that are less obvious to see a connection.
For Pandas Users#
Pandas DataFrame API |
Ray Datasets API |
---|---|
df.head() |
|
df.dtypes |
|
len(df) or df.shape[0] |
|
df.truncate() |
|
df.iterrows() |
|
df.drop() |
|
df.transform() |
|
df.groupby() |
|
df.groupby().apply() |
|
df.sample() |
|
df.sort_values() |
|
df.append() |
|
df.aggregate() |
|
df.min() |
|
df.max() |
|
df.sum() |
|
df.mean() |
|
df.std() |
For PyArrow Users#
PyArrow Table API |
Ray Datasets API |
---|---|
pa.Table.schema |
|
pa.Table.num_rows |
|
pa.Table.filter() |
|
pa.Table.drop() |
|
pa.Table.add_column() |
|
pa.Table.groupby() |
|
pa.Table.sort_by() |