Skip to content

Commit

Permalink
Merge pull request rapidsai#280 from randerzander/doc_improvements
Browse files Browse the repository at this point in the history
[REVIEW] Added IO module to docs, exposes read_csv, fixed warning with docstri…
  • Loading branch information
kkraus14 authored Oct 15, 2018
2 parents 6b7de97 + 913e245 commit 30e5c49
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 41 deletions.
21 changes: 9 additions & 12 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,32 @@ API Reference

.. currentmodule:: pygdf.dataframe


DataFrame
---------

.. autoclass:: DataFrame
:members:

.. automodule:: pygdf.multi
:members:

Series
------

.. autoclass:: Series
.. autoclass:: pygdf.Series
:members:



.. currentmodule:: pygdf.groupby

Groupby
-------

.. currentmodule:: pygdf.groupby
.. autoclass:: Groupby
:members:


.. currentmodule:: pygdf.gpuarrow
IO
--------------
.. automodule:: pygdf.io
:members:

GpuArrowReader
--------------

.. currentmodule:: pygdf.gpuarrow
.. autoclass:: GpuArrowReader
:members:
25 changes: 9 additions & 16 deletions pygdf/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,30 +677,23 @@ def merge(self, other, on=None, how='left', lsuffix='_x', rsuffix='_y',
Parameters
----------
other : DataFrame
on : label or list; defaults to None
Column or index level names to join on. These must be found in
both DataFrames. If on is None and not merging on indexes then
both DataFrames.
If on is None and not merging on indexes then
this defaults to the intersection of the columns
in both DataFrames.
how : str; defaults to 'left'
Only accepts "left"
- left: use only keys from left frame, similar to
a SQL left outer join; preserve key order
how : str, defaults to 'left'
Only accepts 'left'
left: use only keys from left frame, similar to
a SQL left outer join; preserve key order
lsuffix : str, defaults to '_x'
The suffix to apply to overlapping column names
in the left side
Suffix applied to overlapping column names on the left side
rsuffix : str, defaults to '_y'
The suffix to apply to overlapping column names
in the right side
Suffix applied to overlapping column names on the right side
type : str, defaults to 'hash'
Returns
-------
merged : DataFrame
Expand Down
16 changes: 4 additions & 12 deletions pygdf/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ def read_csv(filepath, lineterminator='\n',
delimiter=',', sep=None, delim_whitespace=False,
skipinitialspace=False, names=None, dtype=None,
skipfooter=0, skiprows=0, dayfirst=False):

"""
Read CSV data into dataframe.
Load and parse a CSV file into a DataFrame
Parameters
----------
Expand All @@ -33,7 +32,7 @@ def read_csv(filepath, lineterminator='\n',
Delimiter to be used.
delim_whitespace : bool, default False
Determines whether to use whitespace as delimiter.
lineterminator : char, default '\n'
lineterminator : char, default '\\n'
Character to indicate end of line.
skipinitialspace : bool, default False
Skip spaces after delimiter.
Expand All @@ -51,9 +50,8 @@ def read_csv(filepath, lineterminator='\n',
-------
GPU ``DataFrame`` object.
Example
-------
Examples
--------
foo.txt : ::
50,50|40,60|30,70|20,80|
Expand All @@ -66,14 +64,8 @@ def read_csv(filepath, lineterminator='\n',
col1 col2
0 40 60
1 30 70
"""

# def read_csv(filepath, lineterminator='\n',
# delimiter=',', sep=None, delim_whitespace=False,
# skipinitialspace=False, names=None, dtype=None,
# skipfooter=0, skiprows=0, dayfirst=False):

if names is None or dtype is None:
msg = '''Automatic dtype detection not implemented:
Column names and dtypes must be specified.'''
Expand Down
2 changes: 1 addition & 1 deletion pygdf/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def should_use_ipc(context):
destination.
"""
_CONFIG_USE_IPC = bool(int(os.environ.get("DASK_GDF_USE_IPC", "1")))

# User opt-out
if not _CONFIG_USE_IPC:
return False
Expand Down

0 comments on commit 30e5c49

Please sign in to comment.