Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
d8f01a5
Initial commit. DataFrame.sum now returns Modin distributed series
devin-petersohn Mar 25, 2019
ee4f9ef
Fix failures and improve empty DataFrame ops
devin-petersohn Apr 4, 2019
cf1ed12
More cleanup
devin-petersohn Apr 4, 2019
2fca479
Merge branch 'master' into features/distributed_series
devin-petersohn Apr 4, 2019
341fd67
Fix regression
devin-petersohn Apr 4, 2019
2122cbc
Add some Series tests
devin-petersohn Apr 5, 2019
feeab6b
Update tests
devin-petersohn Apr 8, 2019
0aad069
Add more tests
devin-petersohn Apr 8, 2019
8a0253b
Add tests
devin-petersohn Apr 9, 2019
3b34b50
Add tests
devin-petersohn Apr 9, 2019
a934324
Add more tests
devin-petersohn Apr 10, 2019
1f03204
Merge branch 'master' into features/distributed_series
devin-petersohn Apr 10, 2019
3a6f256
Add tests
devin-petersohn Apr 10, 2019
c6f9536
Add tests
devin-petersohn Apr 11, 2019
093d367
Add tests
devin-petersohn Apr 11, 2019
a3ffeae
Address comments
devin-petersohn Apr 11, 2019
541dc95
Add Series to coverage test
devin-petersohn Apr 11, 2019
9dc17c6
Run series tests on travis
devin-petersohn Apr 12, 2019
54f0255
Add tests
devin-petersohn Apr 12, 2019
a32c3b9
Add tests
devin-petersohn Apr 12, 2019
5c1aa62
Fix general tests
devin-petersohn Apr 12, 2019
0826dfb
Add tests (#28)
williamma12 Apr 12, 2019
fae2173
Finished everything below and including valid (#29)
williamma12 Apr 12, 2019
b5c7ef2
Add tests
devin-petersohn Apr 12, 2019
0004e01
Merge branch 'features/distributed_series' of github.com:devin-peters…
devin-petersohn Apr 12, 2019
b7431f9
Lint
devin-petersohn Apr 12, 2019
76e268e
Fix flipped axis
devin-petersohn Apr 12, 2019
0767a2f
Fix failures for unmaterialized DataFrames
devin-petersohn Apr 13, 2019
9e58526
Lint
devin-petersohn Apr 13, 2019
6748829
Fix failures
devin-petersohn Apr 13, 2019
746d24d
Fix Py2 error
devin-petersohn Apr 13, 2019
ccf29a5
Fix defaulting to pandas for Series
devin-petersohn Apr 13, 2019
f3648a2
Cleanup
devin-petersohn Apr 13, 2019
0f7736b
Address comments
devin-petersohn Apr 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ omit =
# Skip tests
modin/pandas/test/*
modin/experimental/pandas/test/*
# This is not distributed yet
modin/pandas/series.py
# Plotting is not tested
modin/pandas/plotting.py
# Skip Dask until it is fully a part of the testing suite
Expand Down
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ script:
- if [[ "$MODIN_DF_TEST" == "ONE" ]]; then python -m pytest -n auto --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_dataframe.py::TestDFPartOne --cov-append; fi
- if [[ "$MODIN_DF_TEST" == "TWO" ]]; then python -m pytest -n auto --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_dataframe.py::TestDFPartTwo --cov-append; fi
- if [[ "$MODIN_DF_TEST" == "ALL" ]]; then python -m pytest -n auto --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_dataframe.py --cov-append; fi
- python -m pytest --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_series.py --cov-append
- python -m pytest --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_concat.py --cov-append
- python -m pytest --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_groupby.py --cov-append
- python -m pytest --disable-pytest-warnings --cov-config=.coveragerc --cov=modin modin/pandas/test/test_reshape.py --cov-append
Expand Down
245 changes: 29 additions & 216 deletions modin/backends/base/query_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ def _set_columns(self, new_columns):
# END dtypes and indexing abstract methods

# Metadata modification abstract methods
def add_prefix(self, prefix):
def add_prefix(self, prefix, axis=1):
raise NotImplementedError("Must be implemented in children classes")

def add_suffix(self, suffix):
def add_suffix(self, suffix, axis=1):
raise NotImplementedError("Must be implemented in children classes")

# END Metadata modification abstract methods
Expand Down Expand Up @@ -200,213 +200,37 @@ def inter_manager_operations(self, other, how_to_join, func):
"""
raise NotImplementedError("Must be implemented in children classes")

def add(self, other, **kwargs):
"""Adds this manager with other object (manager or scalar).
def binary_op(self, op, other, **kwargs):
"""Perform an operation between two objects.

Note: The list of operations is as follows:
- add
- eq
- floordiv
- ge
- gt
- le
- lt
- mod
- mul
- ne
- pow
- rfloordiv
- rmod
- rpow
- rsub
- rtruediv
- sub
- truediv
- __and__
- __or__
- __xor__
Args:
other: The other object (manager or scalar).
op: The operation. See list of operations above
other: The object to operate against.

Returns:
New DataManager with added data and new index.
"""
raise NotImplementedError("Must be implemented in children classes")

def div(self, other, **kwargs):
"""Divides this manager with other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with divided data and new index.
"""
raise NotImplementedError("Must be implemented in children classes")

def eq(self, other, **kwargs):
"""Compares equality (==) with other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with compared data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def floordiv(self, other, **kwargs):
"""Floordivs this manager with other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with floordiv-ed data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def ge(self, other, **kwargs):
"""Compares this manager >= than other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with compared data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def gt(self, other, **kwargs):
"""Compares this manager > than other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with compared data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def le(self, other, **kwargs):
"""Compares this manager < than other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with compared data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def lt(self, other, **kwargs):
"""Compares this manager <= than other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with compared data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def mod(self, other, **kwargs):
"""Mods this manager against other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with mod-ed data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def mul(self, other, **kwargs):
"""Multiplies this manager against other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with multiplied data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def ne(self, other, **kwargs):
"""Compares this manager != to other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with compared data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def pow(self, other, **kwargs):
"""Exponential power of this manager to other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with pow-ed data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def rdiv(self, other, **kwargs):
"""Divides other object (manager or scalar) with this manager.

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with divided data and new index.
"""
raise NotImplementedError("Must be implemented in children classes")

def rfloordiv(self, other, **kwargs):
"""Floordivs this manager with other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with floordiv-ed data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def rmod(self, other, **kwargs):
"""Mods this manager with other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with mod data and index.
"""
raise NotImplementedError("Must be implemented in children classes")

def rpow(self, other, **kwargs):
"""Exponential power of other object (manager or scalar) to this manager.

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with pow-ed data and new index.
"""
raise NotImplementedError("Must be implemented in children classes")

def rsub(self, other, **kwargs):
"""Subtracts other object (manager or scalar) from this manager.

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with subtracted data and new index.
"""
raise NotImplementedError("Must be implemented in children classes")

def sub(self, other, **kwargs):
"""Subtracts this manager from other object (manager or scalar).

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with subtracted data and new index.
"""
raise NotImplementedError("Must be implemented in children classes")

def truediv(self, other, **kwargs):
"""Divides this manager with other object (manager or scalar).
Functionally same as div

Args:
other: The other object (manager or scalar).

Returns:
New DataManager with divided data and new index.
A new QueryCompiler object.
"""
raise NotImplementedError("Must be implemented in children classes")

Expand Down Expand Up @@ -868,17 +692,6 @@ def back(self, n):
# END head/tail/front/back

# Abstract __getitem__ methods
def getitem_single_key(self, key):
"""Get item for a single target index.

Args:
key: Target index by which to retrieve data.

Returns:
A new Query Compiler.
"""
raise NotImplementedError("Must be implemented in children classes")

def getitem_column_array(self, key):
"""Get column data for target labels.

Expand Down
Loading