Unverified Commit 8a8d36e9 authored by Minjie Wang's avatar Minjie Wang Committed by GitHub
Browse files

[Doc] add doc for DGLCSVDataset

[Doc] add doc for DGLCSVDataset
parents 39121dfd 6ce3c178
......@@ -18,6 +18,10 @@ Base Dataset Class
.. autoclass:: DGLDataset
:members: download, save, load, process, has_cache, __getitem__, __len__
CSV Dataset Class
-----------------
.. autoclass:: CSVDataset
Node Prediction Datasets
---------------------------------------
......
This diff is collapsed.
......@@ -23,6 +23,7 @@ shows how to implement each component of it.
* :ref:`guide-data-pipeline-process`
* :ref:`guide-data-pipeline-savenload`
* :ref:`guide-data-pipeline-loadogb`
* :ref:`guide-data-pipeline-loadcsv`
.. toctree::
:maxdepth: 1
......@@ -34,3 +35,4 @@ shows how to implement each component of it.
data-process
data-savenload
data-loadogb
data-loadcsv
\ No newline at end of file
......@@ -6,8 +6,7 @@ from ..base import DGLError
class CSVDataset(DGLDataset):
""" This class aims to parse data from CSV files, construct DGLGraph
and behaves as a DGLDataset.
"""Dataset class that loads and parses graph data from CSV files.
Parameters
----------
......@@ -51,7 +50,9 @@ class CSVDataset(DGLDataset):
any available graph-level data such as graph-level feature, labels.
Examples
[TODO]: link to a detailed web page.
--------
Please refer to :ref:`guide-data-pipeline-loadcsv`.
"""
META_YAML_NAME = 'meta.yaml'
......
......@@ -222,6 +222,16 @@ dataset = SyntheticDataset()
graph, label = dataset[0]
print(graph, label)
######################################################################
# Creating Dataset from CSV via :class:`~dgl.data.CSVDataset`
# ------------------------------------------------------------
#
# The previous examples describe how to create a dataset from CSV files
# step-by-step. DGL also provides a utility class :class:`~dgl.data.CSVDataset`
# for reading and parsing data from CSV files. See :ref:`guide-data-pipeline-loadcsv`
# for more details.
#
# Thumbnail credits: (Un)common Use Cases for Graph Databases, Michal Bachman
# sphinx_gallery_thumbnail_path = '_static/blitz_6_load_data.png'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment