Skip to content

Dask doc review: [4] DataFrame #1594

Closed
Closed

Description

@pitrou

DataFrame Overview

The page doesn't mention whether Dask dataframes are mutable or not.

Dask DataFrame API

As with Dask arrays, this page is very long and may benefit from splitting
into logical subpages.

"Top level user functions" are actually methods of Dask dataframes.

DataFrame constructor
'''''''''''''''''''''

The name argument is mentioned as _name in the signature.

DataFrame.append
''''''''''''''''

The example showcases pandas dataframes, not Dask.

DataFrame.assign
''''''''''''''''

"The make things predicatable": typo, should be "to make things predictable".

DataFrame.astype
''''''''''''''''

It doesn't seem very obvious what it does. A dataframe has several columns,
are all columns converted to the same dtype?

DataFrame.cache
'''''''''''''''

"Uses chest by default to store data on disk": what is a "chest" is not
obvious here.

DataFrame.column_info
'''''''''''''''''''''

"Return DataFrame.columns": sure, but columns is not documented.

DataFrame.compute
'''''''''''''''''

"Compute several dask collections at once" doesn't sound like a very
appropriate description. Perhaps "Materialize the Dask dataframe in
parallel and return the resulting pandas dataframe"?

DataFrame.cummax(), DataFrame.cummin(), DataFrame.cumprod(), DataFrame.cumsum()
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

"Return cumulative cummax": perhaps "cumulative maximum" is better?

The return value is mentioned as a Series but it actually returns
a DataFrame.

DataFrame.drop_duplicates()
'''''''''''''''''''''''''''

The documentation doesn't mention that the inplace argument is not
supported.

DataFrame.eval()
''''''''''''''''

The documentation doesn't mention that inplace=False must be passed
if the expression is an assignment.

DataFrame.groupby()
'''''''''''''''''''

The key argument is not documented.

The example shows a non-supported argument (axis).

DataFrame.max(), DataFrame.min()
''''''''''''''''''''''''''''''''

The summary sentence ("This method returns the maximum of the values in
the object.") is misformatted.

DataFrame.merge()
'''''''''''''''''

Perhaps this should mention how merge() is different from join(), unless
this is pandas territory.

DataFrame.random_split()
''''''''''''''''''''''''

The signature shows a p parameter but a frac parameter is
documented instead.

The documentation says frac is an optional float, but it's actually
a required array of probabilities that should sum close to 1.0.

DataFrame.rename()
''''''''''''''''''

"Alter axes input function or functions. Function / dict values must be
unique (1-to-1). Labels not contained in a dict / Series will be left
as-is. Alternatively, change Series.name with a scalar value (Series only).":
this may be me, but this formulation is very confusing. Perhaps spell out
each accepted type separately with its effect?

Also, the example is a pandas example.

DataFrame.to_delayed()
''''''''''''''''''''''

"Convert dataframe into dask Values": perhaps "into dask delayed objects"?

dask.dataframe.map_partitions
'''''''''''''''''''''''''''''

This function probably takes a dataframe as an argument, but it's
not obvious which one (args perhaps?).

dask.dataframe.multi.concat
'''''''''''''''''''''''''''

Is it meant to be called with this module path or as dask.dataframe.concat?
(the presence of the multi submodule seems like an implementation detail)

dask.dataframe.multi.merge
''''''''''''''''''''''''''

This function is mentioned but without an actual documentation.

dask.dataframe.from_pandas
''''''''''''''''''''''''''

The sort and name arguments are not documented.

dask.dataframe.rolling.rolling_chunk
''''''''''''''''''''''''''''''''''''

This function is mentioned but without an actual documentation.

DataFrame Internal Design

This or another page should perhaps discuss how to (re)partition a Dask
dataframe in order to get a nice ordered partitioning, even when the data
comes from arbitrary foreign storage (e.g. a bunch of CSV files).

Shuffling for GroupBy and Join

Easy Case
'''''''''

This does not mention explicitly whether these cases are always fast and
efficient, or only when the partitioning is ordered with known boundaries.

Activity

  1. added a commit that references this issue on Oct 3, 2016
    8b5720f
  2. mrocklin commented on Oct 3, 2016

    @mrocklin
    Member

    As with the array docs, many of the issues here are because we are relying on the pandas docstrings. When we have more time we should go through and clean this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions