You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Inconsistency between doc and code for repartition? #3439
On Wed, Apr 25, 2018 at 3:56 AM, Jörg Dietrich ***@***.***> wrote:
The docstring for dataframe.repartition states
npartitions : int, optional
Number of partitions of output, must be less than npartitions of
input.
yet there seems to be working code for increasing the number of partitions.
import numpy as np
import pandas as pd
import dask.dataframe as dd
X = np.random.normal(size=(1_000_000, 2))
df = pd.DataFrame(X, columns=['A', 'B'])
ddf = dd.from_pandas(df, npartitions=5)
ddf2 = ddf.repartition(npartitions=10)
assert ddf.npartitions == 5
assert ddf2.npartitions == 10
assert np.allclose((ddf**2).compute(), (ddf2**2).compute())
This is with dask 0.17.2, Python 3.6, pandas 0.22.0.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3439>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszCgjrnCy0DKXj6r3L0sUh0E2Irgfks5tsCw3gaJpZM4Ti8jm>
.
Activity
mrocklin commentedon Apr 25, 2018