Skip to content

Commit 3ec0a43

Browse files
committed
Merge remote-tracking branch 'upstream/master' into series_drop
2 parents 8578017 + 1003df7 commit 3ec0a43

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+5174
-594
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ _build
5151

5252
# Spark
5353
spark-warehouse/
54+
55+
# Pypandoc
56+
pandoc*
57+
whatsnew
58+

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ matrix:
3636
- PATH=$(echo "$PATH" | sed -e 's/:\/usr\/local\/lib\/jvm\/openjdk11\/bin//')
3737
- JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
3838
- SPARK_VERSION=2.4.4
39-
- PANDAS_VERSION=0.25.0
39+
- PANDAS_VERSION=0.25.1
4040
- PYARROW_VERSION=0.13.0
4141

4242
before_install:

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ pandas is the de facto standard (single-node) DataFrame implementation in Python
1010

1111
This project is currently in beta and is rapidly evolving, with a weekly release cadence. We would love to have you try it and give us feedback, through our [mailing lists](https://groups.google.com/forum/#!forum/koalas-dev) or [GitHub issues](https://github.com/databricks/koalas/issues).
1212

13+
Try the Koalas 10 minutes tutorial on a live notebook in Jupyter here [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/databricks/koalas/master?filepath=docs%2Fsource%2Fgetting_started%2F10min.ipynb)
14+
. The initial launch can take up to several minutes.
15+
1316
[![Build Status](https://travis-ci.com/databricks/koalas.svg?token=Rzzgd1itxsPZRuhKGnhD&branch=master)](https://travis-ci.com/databricks/koalas)
1417
[![codecov](https://codecov.io/gh/databricks/koalas/branch/master/graph/badge.svg)](https://codecov.io/gh/databricks/koalas)
1518
[![Documentation Status](https://readthedocs.org/projects/koalas/badge/?version=latest)](https://koalas.readthedocs.io/en/latest/?badge=latest)

databricks/koalas/frame.py

+377-106
Large diffs are not rendered by default.

databricks/koalas/generic.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
from databricks.koalas.indexing import AtIndexer, ILocIndexer, LocIndexer
3535
from databricks.koalas.internal import _InternalFrame
3636
from databricks.koalas.utils import validate_arguments_and_invoke_function
37+
from databricks.koalas.window import Rolling, Expanding
3738

3839

3940
class _Frame(object):
@@ -1255,11 +1256,13 @@ def groupby(self, by, as_index: bool = True):
12551256

12561257
df_or_s = self
12571258
if isinstance(by, str):
1259+
by = [(by,)]
1260+
elif isinstance(by, tuple):
12581261
by = [by]
12591262
elif isinstance(by, Series):
12601263
by = [by]
12611264
elif isinstance(by, Iterable):
1262-
by = list(by)
1265+
by = [key if isinstance(key, (tuple, Series)) else (key,) for key in by]
12631266
else:
12641267
raise ValueError('Not a valid index: TODO')
12651268
if not len(by):
@@ -1384,6 +1387,12 @@ def median(self, accuracy=10000):
13841387
# This is expected to be small so it's fine to transpose.
13851388
return DataFrame(sdf)._to_internal_pandas().transpose().iloc[:, 0]
13861389

1390+
def rolling(self, *args, **kwargs):
1391+
return Rolling(self)
1392+
1393+
def expanding(self, *args, **kwargs):
1394+
return Expanding(self)
1395+
13871396
@property
13881397
def at(self):
13891398
return AtIndexer(self)
@@ -1421,7 +1430,7 @@ def _resolve_col(kdf, col_like):
14211430
assert kdf is col_like._kdf, \
14221431
"Cannot combine column argument because it comes from a different dataframe"
14231432
return col_like
1424-
elif isinstance(col_like, str):
1433+
elif isinstance(col_like, tuple):
14251434
return kdf[col_like]
14261435
else:
14271436
raise ValueError(col_like)

0 commit comments

Comments
 (0)